Hi,
I would like to render a table with a number of
columns. When a particular cell in a column is
clicked, the user must have the option of selecting
from a dropdown list (select/option).
I have implemented this feature using the 0.6 codebase
and tested in IE 6 and Firefox 1.5.
I have changed the set_col_editable () method to take
an optional third argument, the model. The model is
stored in the "os3_model" column attribute and used
when the user double clicks the cell (of type "select").
e.g.
g.set_col_editable ( 2, "select", selectModel);
where selectModel is a two dimensional array containing
value/label pairs (see attached file)
This translates to a new method: grid_cell_select_edit
when the user doubleclicks the cell, which renders the
options and select elements.
Also added in the js file is the method:
grid_select_edit_end
A custom renderer is used to render the values of the
model:
g.set_col_render ( 2, render_from_model );
I have attached the prototype. You may need to change
the paths to the js and css files in the head.
Let me know your thoughts.
Justin
Prototype of select functionality