That really depends on a few things, mainly if the grid is sortable or not.
If it is, the index is pretty much worthless b/c it won't be the same as it
appears in the grid.. Probably the simplest way is bind to a dataview, set
it's RowFilter property, then just delete those indexes directly. If you
filtered out 100 records so only one showed, called DataViewName[0].Delete,
you'd delete that row.
Is that what you need?
--
W.G. Ryan, eMVP
Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...
how wud i find index for rows with specified Client_Consulatnt_ID?
"William Ryan eMVP" wrote:
DataTable.Clear or loop through and call .Delete on each row - you'll do
the same for specific rows (call Delete on their respective index).
--
W.G. Ryan, eMVP
Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message
news:D3**********************************@microsof t.com... My DataGrid is bound to DataView as follow
DataGrid1.DataSource = myDS.Tables("Client_Consultant").DefaultView
User can either delete all the rows in the DataGrid on by pressing
"Delete All" button or provide Client_Consulatnt_ID and press "Delete" button to
delete rows with that Client_Consulatnt_ID. My question is:
1. How can i delete all the rows on click of a button.
2. How can i remove all the rows with particular Client_Consulatnt_ID
thanx