Hello,
I'm creating a new ListGridField of ListGridFieldType.BOOLEAN which renders in the non-editable grid as a checkbox item on the filter header and in its rows. The title of the column is align in center.
That's all good, but it doesn't do anything yet.
I add a setCellFormatter and tried returning "true"/"false" or "1"/"0" (a function by checking another field in the incoming record) but when I do that, I lose the checkbox items in the rows (not in the filter header), everything in the column is aligned left and the values come up as my String ("true"/"false").
Probably because the cellFormatter function expects raw html, I realized.
So I then wrapped the value in a CheckBoxItem, added that to a DynamicForm and returned the innerHTML of that form.
That works, thought I can't get the alignment correct. But I'm wondering if this is the best approach, as it sounds overkill.
I'm creating a new ListGridField of ListGridFieldType.BOOLEAN which renders in the non-editable grid as a checkbox item on the filter header and in its rows. The title of the column is align in center.
That's all good, but it doesn't do anything yet.
I add a setCellFormatter and tried returning "true"/"false" or "1"/"0" (a function by checking another field in the incoming record) but when I do that, I lose the checkbox items in the rows (not in the filter header), everything in the column is aligned left and the values come up as my String ("true"/"false").
Probably because the cellFormatter function expects raw html, I realized.
So I then wrapped the value in a CheckBoxItem, added that to a DynamicForm and returned the innerHTML of that form.
That works, thought I can't get the alignment correct. But I'm wondering if this is the best approach, as it sounds overkill.
Comment