is there a way to get chekboxes instead the Text “True”/“False” in grid?
to filter a bit field (Boolean True/False) in datagrid one must type true or false in filter field. What must i do to do it in german? something like typing “j” or “n” were great. Users are not familiar with true/false
Yes, you can use the Template property of a column and add a checkbox. Here is a quick template that will get a disabled checkbox (you can also use the template designer) <rz-checkbox [value]="data?.CheckboxProperty" [disabled]="true" [triState]="true"></rz-checkbox>
Good catch! We have implemented checkbox filtering UI for boolean columns and it will be included in the next Radzen release.
Hi Atanas,
i have used the Template Editor to get a checkbox in a datagrid column.
Json:
{
"property": "Handelsware",
"template": [
{
"name": "checkbox0",
"type": "checkbox",
"value": "Handelsware"
}
],
"title": "Handelsware",
"type": "boolean"
},
You can simply wrap the checkbox in a DIV with text-align:center <div style='text-align:center'><rz-checkbox [value]="data?.CheckboxProperty" [disabled]="true" [triState]="true"></rz-checkbox></div>
I have a Blazor project with a grid. I have added the template as above (of course, changing the property name to the right value) but I can't get anything to show up in the column when I use a template - the column appears blank. Remove the template and I get the standard True/False values.
The data returned in these columns are bit types.
I also tried using the designer - dragged and dropped a checkbox on the designer, named it and set the property to ${data.IsPrivate}. When I exit the designer, the grid is replaced with an error message telling me the checkbox can't find a form.
I was pretty brain-fried yesterday afternoon. I realized that it was Angular sometime in the middle of the night.
That said, I tried it with native Radzen components in the template editor and it did not work, so I ended up using standard HTML checkboxes. Now it does.
Thanks for you help and patience with stupid questions...