László Pétervári
06.16.2012
In these situations using a nullable type seems to be a good solution, instead of using not nullable type and a special value to represent "null".
The only correct way here is to use unbound columns. I have created a small sample to illustrate this.
I hope this information will be helpful to you.
-
Hello Gosha, sorry for the late reply.
Unfortunately using unbound columns is not an acceptable solution in my real project, because I have several grids with a lot of such numeric columns. I'm completely stuch with this (I think not so uncommon) problem. See also my other post at http://www.devexpress.com/Support/Center/Question/Details/Q414847 for further clarification of my problem.
Thank you! -
Just now I got an idea. Wouldn't it solve all my problems if I used "double?" instead of "double" for my underlying property? Can a GridView work with nullable types property? I mean sorting and filtering by value.
-
I've tested "double?" instead of using -1, and it looks fine.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.
Facebook
Twitter
Google+