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

Iterate with JavaScript in the RadGrid

3 Answers 402 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 13 Mar 2009, 07:20 AM
Are there some examples howto Iterate with JavaScript in the RadGrid?

I have to change some values in the Grid wirh JavaScriipt.

Thanks

Christian

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 13 Mar 2009, 09:56 AM
Hello Christian,

Try the following approach:
var masterTable = $find("<%=RadGrid1.ClientID%>").get_masterTableView(); 
var cellText; 
for(var row = 0; row < masterTable.get_dataItems().length; row++) 
    cellText = masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[row], "ColumnName").innerHTML

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Christian
Top achievements
Rank 1
answered on 13 Mar 2009, 10:46 AM
Thanks,
what does "ColumnName" means?

HeaderText, UniqueName or  DataField

Christian

 

0
Accepted
Daniel
Telerik team
answered on 13 Mar 2009, 11:18 AM
Hello Christian,

ColumnName means the UniqueName of your column.
Getting RadGrid client object
getCellByColumnUniqueName

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Christian
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Christian
Top achievements
Rank 1
Share this question
or