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

[Solved] Cannot sort on boolean in Grid

1 Answer 17 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ryan
Top achievements
Rank 1
Ryan asked on 09 Nov 2010, 11:22 AM
Hi,

I'm binding to a boolean in my Grid using;

columns.Bound(x => x.IsActive).Template(x => x.IsActive ? "Active" : "Inactive" ).Width(100);

Which works just fine and displays as I'd expect.  I can filter on 'true' and 'false' with the behaviour being as expected.  However I can't seem to sort.  When I click the column header to sort the data is displayed in its unsorted state.  If I remove the server template the behaviour is the same.

Can anyone help?

Ryan.

1 Answer, 1 is accepted

Sort by
0
Ryan
Top achievements
Rank 1
answered on 09 Nov 2010, 11:36 AM
I've very quickly solved my problem but I wonder if it should be filed as a bug.

I had multi-column sorting enabled which meant that columns further left in the grid were taking sort priority over those on the right.

I guess this behaviour is by design, but it's a little confusing.  It would be good if sort priority could be given to the most recently selected item.
Tags
Grid
Asked by
Ryan
Top achievements
Rank 1
Answers by
Ryan
Top achievements
Rank 1
Share this question
or