|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Determine Selected Rows in DataGrid C#Does anyone have any C# code snippet for iterating thro a datagrids rows and
getting the values of the rows that have been selected Hi,
Actually u didn't mention what u mean by Selected Rows.........is there is any check box column in Grid to select COlunms or u wan a all the records that are selected through COntrol Key........... Here i have code through which u can access multiple selected Rows of Grid....... Dim int As Integer For int = 0 To BindingContext(dgData.DataSource).Count - 1 If (dgData.IsSelected(int)) Then MessageBox.Show(dgData.Item(int, 1)) End If Next I hope this will help u............. Reagrds, Ritesh
Other interesting topics
No touch deployment - IEEXEC won't fire up
No popup event when using shortcuts in context menu How can one select from overlapped panels in the form design View? extra header in datagrid Is there a way to set the category order in the PropertyGrid Changing Treeview's selectedNode in Afterselect event. Error lost in databinding DateTimePicker events PictureBox that Receives and Shows Input Focus Check-boxes on TreeNodes |
|||||||||||||||||||||||