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

How to get all columns values from Grid In ClientSide Javascript

2 Answers 426 Views
Grid
This is a migrated thread and some comments may be shown as answers.
A2H
Top achievements
Rank 1
A2H asked on 05 Oct 2012, 11:48 AM
Hi,

I need to get all values of a particular columns in Telerik RadGrid in client side javascript?I want all the values in that columns irrespective of it is selected or not?

Can any one please help me how to achieve this?

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 05 Oct 2012, 12:31 PM
Hi,

Try the following javascript to achieve your scenario.
JS:
function pageLoad()
{
  var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
  var row = masterTable.get_dataItems();
    for (var i = 0; i < row.length; i++)
   {
        alert(masterTable.getCellByColumnUniqueName(row[i], "UniqueName").innerHTML);
    }
 }

Thanks,
Princy.
0
A2H
Top achievements
Rank 1
answered on 05 Oct 2012, 01:16 PM
Thanks Princy.
This one worked like a charm.

Small Hint : If you are using a Template column instead of GridBound Column.
Use Innertext Property instead of InnerHtml

Thanks,
A2H
Tags
Grid
Asked by
A2H
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
A2H
Top achievements
Rank 1
Share this question
or