I current have a html table that contains 2 columns. A property and a value. When the page is built( jsp ) the data is interpreted to determine the appropriate type for the column( Text, RadioButton, CheckBox, Color, Select, etc ).
So the resultant page looks like:
Property Value
A [Select]
B [CheckBox]
C [Text]
Is there a way to do this with the Grid?
Thanks

I believe you can. When you
I believe you can. When you create your grid "view", omit a "value" (and if using "field", use an integer, not a field name) for the cell that will contain the select/checkbox/etc. Instead include the "get" parameter and set it to the function, e.g., {name:"value",get:setCellValue,...}, that will determine what type element to insert in that cell, based on other data in that cell's row.
A function similar to this:
function setCellValue(inRowIndex) { switch(myFunctionToRetrieveRelevantPropertyFromDatastore(inRowIndex)) { case 'A': return "..."; break; case 'B': return ""; break; . . . } }Is there any way to return a
Is there any way to return a dojo widget? I would like to use the various form controls.
You may want to look in the
You may want to look in the documentation for the Grid, where the editors are described. For example, they include editors that include Bool (checkbox), CheckBox, Input, etc. But, except for Bool, you will not see the widget until you single/dblclick the field.
It may be possible to use the same code as shown in the prior reply to construct a widget, then set the cell's value to the widget's domNode in the switch statement. Give it a try.