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

How to get the value of radgrid column using jquery

3 Answers 376 Views
Grid
This is a migrated thread and some comments may be shown as answers.
RJ
Top achievements
Rank 1
RJ asked on 17 Jan 2013, 08:39 PM
Hi, is there a way to get the value column from selected row on radgrid using jquery
This dont work for me using radgrid, its for asp grid. $("table#ctl100_thisGrid tbody td:nth-child(5)").text()
Thanks in advance

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Jan 2013, 06:05 AM
Hi,

Try the following code to achieve your scenario.
JS:
<script type="text/javascript">
    $(document).ready(function () {
        $("#Button1").click(function () {
  var masterTable = $find('<%= RadGrid1.ClientID %>').get_masterTableView();
            var row = masterTable.get_selectedItems();
            for (var i = 0; i < masterTable.get_selectedItems().length; i++) {
                var cell = masterTable.getCellByColumnUniqueName(masterTable.get_selectedItems()[i], "Uniquename");
                alert(cell.innerHTML);
            }
        });
 });
</script>

Thanks,
Shinu
0
RJ
Top achievements
Rank 1
answered on 18 Jan 2013, 07:08 AM
Im having a problem on '$find'  it has this error. Microsoft JScript runtime error: The value of the property '$find' is null or undefined, not a Function object

Im just wondering if this code works to rad classic controls? Im no using radajax yet.

I also did use
var masterTable = $("#Radgrid1").get_masterTableView();

but it has new error: Microsoft JScript runtime error: Object doesn't support property or method 'get_masterTableView'

any workaround? Thanks again.

0
Abhay
Top achievements
Rank 1
answered on 31 Mar 2015, 09:44 AM
how to select all rows on button click from radGrid in Jquery,
where I have used paging?

thank you
Tags
Grid
Asked by
RJ
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
RJ
Top achievements
Rank 1
Abhay
Top achievements
Rank 1
Share this question
or