How to get the value of radgrid column using jquery

4 posts, 0 answers
  1. RJ
    RJ avatar
    386 posts
    Member since:
    Oct 2006

    Posted 17 Jan 2013 Link to this post

    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
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 18 Jan 2013 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. RJ
    RJ avatar
    386 posts
    Member since:
    Oct 2006

    Posted 18 Jan 2013 Link to this post

    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.

  5. Abhay
    Abhay avatar
    4 posts
    Member since:
    Feb 2015

    Posted 31 Mar 2015 Link to this post

    how to select all rows on button click from radGrid in Jquery,
    where I have used paging?

    thank you
Back to Top