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

[Solved] Sorting on checkbox column in Grid

0 Answers 8 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sudesh
Top achievements
Rank 1
Sudesh asked on 04 Jan 2013, 01:07 AM
Hi,

I have used ClientTemplate to add a check box in a Grid. I have also defined the header for this column as a check box using HeaderTemplate. The snippet is as follows:-

.Columns(columns =>
    {
      columns.Bound(o => o.EmployeeName);
      columns.Bound(o => o.EmployeeID)
       .ClientTemplate("<input id='checkBox<#= EmployeeID #>' type='checkbox' value='<#= EmployeeID #>' onclick='manageHeaderSelection()' />")
       .HeaderTemplate("<input id='checkBoxHeader' type='checkbox' onclick='manageRowSelection()'/>")
       .Title("")
       .Sortable(true);
   }

I want to have sorting on the check box column that should allow me to sort all Checked\Unchecked rows together.

How to achieve this? Sorting does not seem to be working in my case.

Regards,
Sudesh
Tags
General Discussions
Asked by
Sudesh
Top achievements
Rank 1
Share this question
or