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

Checkbox images in DataGridBooleanColumn

4 Answers 70 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alessandro
Top achievements
Rank 2
Alessandro asked on 12 Mar 2015, 08:59 PM
Hi,
I'm using DataGrid and already updated with latest release Q1 2015.
In DataGridBooleanColumn there are two images to show checkbox status binded to a boolean value, and I need to change them if possibile. Especially that one showing false value.
So is it possible to use custom images in DataGridBooleanColumn? I imagine there's a style for that?! 

Thank you in advance for any help you may give.

Alessandro

4 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 17 Mar 2015, 12:15 PM
Hi Alessandro,

Currently, you cannot alter the default symbols used to display the checked and unchecked state as the item displayed is actually textblock (used for performance reasons). Thus you can control only the appearance of the text.

If you are looking for a custom visualization of the boolean data you can use template column and place you custom content in CellContentTemplate.



Regards,
Tsvyatko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Alessandro
Top achievements
Rank 2
answered on 17 Mar 2015, 01:35 PM
Hi,
thank you for your suggestion. Template column is the way indeed !
BTW, it seems not possible to sort a template column or even a image column binded to a boolean property of the model and using a converter to get the image as path. 
So I suppose I have to use sortdescriptors using the command CustomColumnHeaderTapCommand when I click on a header. Quite difficult to implement but problem here is that I loose sort indicators (little arrows).
Sorry to post another question here but I really need to understand if I'm going in the right direction.
Thank you.

Alessandro

















0
Accepted
Tsvyatko
Telerik team
answered on 17 Mar 2015, 02:40 PM
Hello Alessandro,

You can assign the sort descriptor that you need for the template column using DataGridTemplateColumn.SortDescriptor property. You can find more about the template column capabilities in this help article- http://docs.telerik.com/windows-universal/controls/raddatagrid/columns/datagrid-templatecolumn

Regards,
Tsvyatko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Alessandro
Top achievements
Rank 2
answered on 19 Mar 2015, 04:07 PM
Dear Tsvyatko,
thank you again... you saved my day :)
Tags
DataGrid
Asked by
Alessandro
Top achievements
Rank 2
Answers by
Tsvyatko
Telerik team
Alessandro
Top achievements
Rank 2
Share this question
or