We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Getting reference to new row in Grid which is being added but not finished

Hello, My application includes a DataBoundGrid having 5 columns (3 in display + 2 hidden). To add new row, User has to click into first column (or cell) of new row and then go to the search panel to select the value to be filled in that cell. Filling of this cell is being done in a method which populates that cell in following steps. 2)Get Currency Manager 3)Get current row by Casting CurrencyManager.current to DataRowView. 4)Update this row with value received from search panel so that grid will reflect that value to User. But CurrencyManager.Current never returns new row which is being added. I tried to get count of CurrencyManager.List which comes out as count of existing rows in datasource as well as Grid. Can u please suggest a way of getting a reference to new row being added but not been added completely.

1 Reply

AD Administrator Syncfusion Team July 20, 2004 05:19 AM UTC

The grid does not add the row to the datasource until after the user leaves the row. One way around this problem is to add the row yourself in the the grid''s RowEnter event. Another way is to use the IBindingList.ListChanged event to catch the adding of the new row, and do your work at that point. Here is a forum thread that has code snippets for both techniques. Maybe one of this techniques will let you do what you need. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=16352

Live Chat Icon For mobile
Up arrow icon