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

Client-side Row Selecting

1 Answer 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
AndyL
Top achievements
Rank 1
AndyL asked on 16 Jul 2008, 08:43 PM

I need to access the Rows collection of the RadGrid on the client-side in javascript.

I know this can be done usually by doing:

var row = this.Rows[rowIndex];

...but only if you invoke the javascript directly from the grid...
What do I do if I need to access the rows collection and I've declared the grid like this:

var grid = document.getElementById('gvGrid');

var row = ??????

?

Thanks
AndyL

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 17 Jul 2008, 07:33 AM
Hi,

You can access the Grid Row on the client side as shown below.

JS:
 var grid = $find("<%= RadGrid1.ClientID %>"); 
  var row = grid.get_masterTableView().get_dataItems()[0]; 


Thanks
Shinu.
Tags
Grid
Asked by
AndyL
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or