Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataGrid question
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00722096
Message ID:
00722176
Views:
12
Hi Carl,

I will assume you are referring to a WinForm DataGrid verses an WebForm DataGrid. You can select multi rows by pressing Ctrl key and clicking multi rows. You also can select them by code like this:
dataGrid1.Select(0)
dataGrid1.Select(1)
...

dataGrid1.UnSelect(0)
After that you may go through the rows and use the IsSelected method to determine if a row is selected.
If dataGrid1.IsSelected(i) Then
   MessageBox.Show("Process Row")
End If
>Helllo,
>
>This should be simple enough...
>
>I have a bound dataGrid that displays the information correctly. Can someone tell me the syntax for looping through a DataGrid to find out which rows were selected?
>
>Thanks,
>Carl
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform