开发者

Rendering/Editing different data objects on one advancedDataGrid

I've been struggl开发者_如何学运维ing with this for quite a while now. The dataProvider for my grid contains several objects. Some of which have a Number value, and some Boolean values under field 'value' (other fields are used in other columns).

I would like to be able to render differently for each data-type, i.e. have a checkBox for booleans, and a label for numbers. Furthermore, I would like to be able to edit these fields differently, unchecking the checkbox for booleans, and using a numericStepper for Numbers.

Any suggestions?

Just FYI, I decided to go with AdvancedDataGrid, to take advantage of the styleFunction property, nothing more..

Tried to used spark-states, which didn't seem to work as I'm using an AdvancedDataGrid. I'm not sure what the problem was.


You can implement this behavior using ItemRenderes and ItemEditors.

you can render out a checkbox if the type of the value is Boolean, and if it's something else you can render out a textInput.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜