Hello there. I am currently evaluating your component, and I am having some problems with the data binding. i have been reading up on this subject for some hours now, but I still remain confused. I was hoping you could offer me some assistance so that I can progress.
To summarise: I have bound your grid to a binding source which is in fact an ArrayList of custom business objects.
Q1. When I edit a row, what event do I trap so that I may call the method of said object in order to update database? Is it better to do this when leaving the row, each cell, ...etc?
Q2. I have created an insert row. But when I enter data into a field in the insert row, then I move focus away, the data in the insert row disappears and the row goes blank again. What am I doing wrong here?
Q3. how do i enabled deleting?
Q4. i have read that because my ArrayList is being used as a BindingSource, then I get all the advantages of the IBindingList interface. Is an ArrayList ok here? Or should I consider using a BindingList<T>?
Very sorry if any of these questions are not directly related to your grid. however they have all arisen as i am trying to evaluate this product for a demo. many thanks.
This problem occurs because your collection doesn't implement the IBindingList interface.
Please review the " XtraGrid Adding and Deleting Records" article and the GridTutorials IBindingList demo.
You should implement this interface in your collection in order to automatically add a new element.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.