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

Client-side row index

2 Answers 249 Views
Grid
This is a migrated thread and some comments may be shown as answers.
StephenWRogers
Top achievements
Rank 1
StephenWRogers asked on 18 Jun 2008, 11:26 AM
With the old Telerik grid I could call row.Index client-side and get the index of the row within the page.

I can't seem to find anything equivalent with the new grid - am I missing something obvious?

Thanks,

Stephen

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Jun 2008, 12:12 PM
Hi,

Try the following code snippet.

ASPX:
        <ClientSettings    > 
         <ClientEvents OnRowSelected="RowSelected"   /> 
         <Selecting  AllowRowSelect="True" /> 
        </ClientSettings> 
          
            


JS:
          <script type="text/javascript"
       
            function RowSelected(sender, eventArgs) 
               { 
                  var dataItem = $get(eventArgs.get_id()); 
                  alert("Row with index: " + dataItem.rowIndex + " selected."); 
                }     
              </script>         
             


Thanks
Shinu.
0
mathieu cupryk
Top achievements
Rank 1
answered on 08 Aug 2012, 05:46 PM

 

<ClientSettings ClientEvents-OnRowSelected="RowSelected">
This would work.

Tags
Grid
Asked by
StephenWRogers
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
mathieu cupryk
Top achievements
Rank 1
Share this question
or