Hi Team,
I'm utilizing the GridView control, and everything is working great. However one thing I'm noticing is when binding to the GridViewCheckBoxColumn, and after the grid loads, the cells don't show the actual checked or unchecked value, but just a square with a minus symbol in it. I have to activate the cell to get it to show if it's checked or not. How can I get it to show the cells state without clicking on it? Or is this a binding problem? Everything else is working great.
See screenshot.
Thanks,
Ryan
I'm utilizing the GridView control, and everything is working great. However one thing I'm noticing is when binding to the GridViewCheckBoxColumn, and after the grid loads, the cells don't show the actual checked or unchecked value, but just a square with a minus symbol in it. I have to activate the cell to get it to show if it's checked or not. How can I get it to show the cells state without clicking on it? Or is this a binding problem? Everything else is working great.
See screenshot.
Thanks,
Ryan
8 Answers, 1 is accepted
0
Hi Ryan,
Regards,
Didie
Telerik
This will be the view if the value of your bound property is null. You can define your own CellTemplate for the column to avoid this appearance:
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
CheckBox
IsChecked
=
"{Binding IsChecked}"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0

Lars
Top achievements
Rank 1
answered on 09 Jul 2013, 03:04 PM
Thanks for the reply Didie, however that's part of the problem. The cell bound data isn't null. The item does have data, but it just doesn't show it has data until you activate the cell by clicking on it, then it will show if it's checked or not. Am I misunderstanding your reply?
Thanks,
Ryan
Thanks,
Ryan
0
Hi Ryan,
Didie
Telerik
I am not able to reproduce such an issue with the latest version. Would you please share what is the version you use? How have you defined the bound property and the column?
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0

Lars
Top achievements
Rank 1
answered on 09 Jul 2013, 05:14 PM
Didie,
I'm using 13.1.403.0 - I have defined the bound property and the column, and they show up just find once I select the grid cell. Everything I'm doing is generated on the fly, so all my data and columns are bound to a gridview I create at runtime.
-Ryan
I'm using 13.1.403.0 - I have defined the bound property and the column, and they show up just find once I select the grid cell. Everything I'm doing is generated on the fly, so all my data and columns are bound to a gridview I create at runtime.
-Ryan
0
Hello Ryan,
Didie
Telerik
I am afraid that I am not able to reproduce the issue. Would you please check my test project that I attached for a reference? How is it different than your solution?
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0

Lars
Top achievements
Rank 1
answered on 10 Jul 2013, 05:05 PM
Ahh ok...I see why this is happening, but not sure of the work around. Your's does work on my box, but mine is configured differently in that the binding is happening with string values, such as "false", or "true"....I changed your solution to work like mine and it still failed.
What I did was change the Club's "IsChecked" property to be a type of string, and then when it was set or retrieved the value would be either "true" or "false". Then when it loaded it loaded as I previously mentioned, as neither true or false until selecting the cell.
I have to use strings because I'm working with only string data and all my grid data is generated on the fly without me being able to properly convert it.
Thanks,
Ryan
What I did was change the Club's "IsChecked" property to be a type of string, and then when it was set or retrieved the value would be either "true" or "false". Then when it loaded it loaded as I previously mentioned, as neither true or false until selecting the cell.
I have to use strings because I'm working with only string data and all my grid data is generated on the fly without me being able to properly convert it.
Thanks,
Ryan
0
Hi Ryan,
Didie
Telerik
The column cannot cast the string value to a Boolean one. You could use a Converter for the Binding and return a Boolean value rather then the input string value.
Let me know how this works for you.
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0

Lars
Top achievements
Rank 1
answered on 12 Jul 2013, 01:14 PM
That did worked wonderfully. Thanks!