RadGrid Sorting While Click on Header

3 posts, 0 answers
  1. Murugavel B
    Murugavel B avatar
    10 posts
    Member since:
    May 2010

    Posted 29 Sep 2010 Link to this post

    My requirement is "while clicking on the header instead of header text sorting should happen". Is it possible with radgrid?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 29 Sep 2010 Link to this post

    Hello,


    Attach the OnColumnClick event and explicitly invoke sort method as shown below.

    JavaScript.
    <script type="text/javascript">
        function OnColumnClick(sender, args) {     
            var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
            masterTable.sort(args.get_gridColumn().get_uniqueName());
        }
    </script>


    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Murugavel B
    Murugavel B avatar
    10 posts
    Member since:
    May 2010

    Posted 29 Sep 2010 Link to this post

    where I have to call this javascript?
Back to Top