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

Null values in cells

2 Answers 334 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 14 Dec 2009, 02:13 PM
I want to have a column wich contains values 1 - n and 'N/A'. I can use a nullable int and TargetNullValue.

DataMemberBinding="{Binding Difference, TargetNullValue=N/A}" 
but then i cant filter by writing 'N/A' i must write 'null' wich is not acceptable. Also the null value (N/A) is not listed in the select filter dialog.

I could also instead of a nullable int use a string, but then the sorting is done in ascii order and not natural order, so if i sort i will get a list with 1, 10, 127, 2 and so on. I would suggest that strings should be sorted in the natural order by default with a option to sort by ascii order. If i do a custom sort the filter dialog is not sorted the same way wich makes it look wierd.

so my question is, how can i make the column and the filter dialog sort the way i want?

2 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 17 Dec 2009, 11:45 AM
Hello Robert,

Please check  the attached project for your reference. Using Converters you can customize the format of your output data.

If you want to apply custom rules to the filtering control please check the article here for more details.


Kind regards,
Tsvyatko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Robert
Top achievements
Rank 1
answered on 18 Dec 2009, 12:24 PM
Thanks for the example project, problem is that my version (2009.1.526.35) does not add "N/A" to the filter dialog and the header for the whole group.
Tags
GridView
Asked by
Robert
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Robert
Top achievements
Rank 1
Share this question
or