This is a migrated thread and some comments may be shown as answers.

Iterate through all rows in a RadGrid

1 Answer 430 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 04 Jun 2013, 12:03 AM
Hello... I'm migrating over from a Winforms JanusGrid to an ASP RadGrid.... so I'm struggling a bit with syntax and methodology. 

I've got a large collection of base classes instantiated by an ASP page... all of my radgrids are 'server side'.

Basically, the user does what they are going to do with the radgrids (selects rows, etc), then hits a submit button.

The entire RadGrid is passed by reference into the corresponding base class so that the functions can iterate through the entire RadGrid, pull out the necessary data from the cells in selected rows (or the entire grid), and then perform whatever logic is necessary.

I see posted examples on how to intercept specific rows as part of the ItemBound method... but I don't see anything that just takes an entire ByRef RadGrid... iterates through the entire items collection (or selecteditems collection), reads in data from specific cells, and then continues.  

Ive got something like this:

 For Each Row As DataGridItem In lstEmployees.SelectedItems
    ClockInEmployee(Row("_ID").text)
 Next

But the syntax isn't correct... 

Can someone point me in the right direction?


Jay

1 Answer, 1 is accepted

Sort by
0
Jay
Top achievements
Rank 1
answered on 04 Jun 2013, 02:11 AM
Ok... ok... took me a while to grock, but I think I got it.

 For Each Row As Telerik.Web.UI.GridDataItem In lstTransactions.SelectedItems
   'do cool stuff
   Dim SomethingCool as String = Row("CoolColumnID").Text
next


Jay
Tags
Grid
Asked by
Jay
Top achievements
Rank 1
Answers by
Jay
Top achievements
Rank 1
Share this question
or