getting records from selected rows.

I am working with GridGroupingControGrid. I am looking for the solution to remove data from a grid. but in my case how to remove data from multiple rows.That is an user has selected multiple rows and trying to delete all that togather. so i need the solution that how can i get only those data which are in selected rows. Waiting For reply Thank You. Vihar.

6 Replies

AD Administrator Syncfusion Team November 14, 2005 01:53 PM UTC

You can use the grid.Table.SelectedRecords collection. Here is a froum thread with some snippets. http://www.syncfusion.com/Support/forums/message.aspx?MessageID=30313


BK Babak Keradman November 14, 2005 08:32 PM UTC

Moderator can delete my post above ^ try this to remove multiple rows: Syncfusion.Grouping.SelectedRecordsCollection selectedRecords; selectedRecords = yourGrid.Table.SelectedRecords; foreach(Syncfusion.Grouping.SelectedRecord record in selectedRecords) { yourDataSet.Tables[0].Rows[record.GetSourcePosition()].Delete(); }


VI vihar November 15, 2005 05:12 AM UTC

thanks for your reply sir....


VI vihar November 15, 2005 05:13 AM UTC

thanks for your reply sir...


VI vihar November 15, 2005 09:03 AM UTC

By this implements i am not getting selected data. in this i am getting selectedRecords.count property valu 0. so i cant go further. I have wrritem my code as..... Syncfusion.Grouping.SelectedRecordsCollection selRecords; selRecords = gridInstance.Table.SelectedRecords; foreach(yncfusion.Grouping.SelectedRecord record in selRecords) { selRecords.Remove(record.Record); }


AD Administrator Syncfusion Team November 15, 2005 09:51 AM UTC

Make sure you are setting: grid.TableOptions.ListBoxSelectionMode = SelectionMode.MultiExtended; grid.TableOptions.AllowSelections = GridSelectionFlags.None; And, if you are using nested tables, then you have to make sure you are accessing the proper Table.SelectedRecords collection.

Loader.
Up arrow icon