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

Selection does not change accordingly

I have a GridDataBoundGrid with extended selection enabled and sorted by particular column, which is not the primary key for the underlying data table. When the new data row is added to the underlying data table, the selection will not change accordingly. That is, user has selected row 1 and row 3 in the sorted view. When a new row added and becoming the row 1 according to the sorting criteria, my expected selection should be row 2 and row 4 rather than remaining row 1 and row 3. Any idea ?

1 Reply

JN Jayakumar Natarajan Syncfusion Team November 7, 2005 02:24 PM UTC

Hi MF, GridDataBoundGrid doesn''t have built in support for associating selected rows with the underlying DataRows whereas GridGroupingControl has this feature. To get this in GDBG, you can try this approach. Before the rows are added in the DataTable, you can store the PrimaryKeys of the selected rows in a datastore. After the new rows are added, you can re-select the rows that has these unique primary keys. Here is a sample. Best regards, Jay

Loader.
Live Chat Icon For mobile
Up arrow icon