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

RadGrid Sorting While Click on Header

2 Answers 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Murugavel B
Top achievements
Rank 1
Murugavel B asked on 29 Sep 2010, 12:33 PM
My requirement is "while clicking on the header instead of header text sorting should happen". Is it possible with radgrid?

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Sep 2010, 12:59 PM
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.
0
Murugavel B
Top achievements
Rank 1
answered on 29 Sep 2010, 02:38 PM
where I have to call this javascript?
Tags
Grid
Asked by
Murugavel B
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Murugavel B
Top achievements
Rank 1
Share this question
or