You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DataGridBooleanColumn shows a box filled with an X (Unicode character U+2612, Ballot Box With X) for false values. In my opinion this is incorrect. I believe it should show an empty box (Unicode character U+2610, Ballot Box) instead.
The text was updated successfully, but these errors were encountered:
Changing the UI is consider as a breaking change and some people that expect to have "\u2612" as visual representation may complain if we decide to change it.
What I believe here will be the best solution is to introduce dependency properties for the checked/unchecked glyph and that way people will be able to set them as desired.
If you are interested on working on this feature simply you need to add the mentioned above properties in the DataGridBooleanColumn, make them work when they are changed at runtime and make a pull request. After that I will review it and if everything looks fine I will merge it.
Please, let me know if you have any additional questions.
Thanks for suggesting the correct way to fix this. I may give it a try. For now, I was able to get my preferred unchecked glyph to display using this awful hack and referencing it from my Xaml:
using Windows.UI.Xaml.Controls;
using Telerik.UI.Xaml.Controls.Grid;
public class MyDataGridBooleanColumn : DataGridBooleanColumn
{
private const string DefaultUncheckedGlyph = "\u2612";
private const string MyUncheckedGlyph = "\u2610";
public override void PrepareCell(object container, object value, object item)
{
base.PrepareCell(container, value, item);
var textBlock = container as TextBlock;
if (textBlock != null && textBlock.Text.Equals(DefaultUncheckedGlyph))
{
textBlock.Text = MyUncheckedGlyph;
}
}
}
I promise I won't submit a pull request for anything like that. 😄
The DataGridBooleanColumn shows a box filled with an X (Unicode character U+2612, Ballot Box With X) for false values. In my opinion this is incorrect. I believe it should show an empty box (Unicode character U+2610, Ballot Box) instead.
The text was updated successfully, but these errors were encountered: