I'm using Smart GWT Pro version 2.1, GWT 2.0.1
I'd like to create a grid such that when in the process of editing it, the cell editor changes based on other changes in the row. I'd like it to behave in very much the same way as the FilterBuilder works. When an editor item is changed by the user, the other editors change type in reaction to this.
For instance, I have a "type" (Enum) as the first column, and if the user selects the first item in the combobox, I'd like the second widget to change from a text to an enum. If the user selects the second item in the enum, I'd like it to be a text area, and so on.
I have tried setting a custom CanvasItem editor on the ListGridField for the item I want to change and overrode "onDraw()", inspecting the grid's getEditedRecord() to change the members in the canvasitem prior to calling super.onDraw(). This seems to do the right thing in the display, but when I click on the canvas to use the widgets it drew, it takes the grid out of edit mode and I'm not able to interact with it. Is this a bug or is it a flaw in my approach?
Any ideas?
I'd like to create a grid such that when in the process of editing it, the cell editor changes based on other changes in the row. I'd like it to behave in very much the same way as the FilterBuilder works. When an editor item is changed by the user, the other editors change type in reaction to this.
For instance, I have a "type" (Enum) as the first column, and if the user selects the first item in the combobox, I'd like the second widget to change from a text to an enum. If the user selects the second item in the enum, I'd like it to be a text area, and so on.
I have tried setting a custom CanvasItem editor on the ListGridField for the item I want to change and overrode "onDraw()", inspecting the grid's getEditedRecord() to change the members in the canvasitem prior to calling super.onDraw(). This seems to do the right thing in the display, but when I click on the canvas to use the widgets it drew, it takes the grid out of edit mode and I'm not able to interact with it. Is this a bug or is it a flaw in my approach?
Any ideas?
Comment