Hi,
Given a grid with several columns, let's say first column contains groups, and second one a group's subunits (one-to-many relationship).
Now, in edit mode, I want second column to turn into a dropdown, and I want it to be populated depending on first column (to change a group's current unit, one can choose from a set of units which 'feed' the drop-down, but this is not the whole set of units in database, but a subset depending on the group's id).
I have something like:
{
name: “group”,
index: “group”,
width: 100,
editable: false
},
{
name: “unit”,
index: “unit”,
width: 150,
editable: true,
edittype: “select”,
editoptions: {
value: unitsForCurrentGroup
}
},
unitsForCurrentGroup is a javascript variable and grid is an inline grid.
I tried to use an onedit – oneditfunc – handler, which is indeed passed the edited row's id (which is equal to group id in my case) and that method returns a group's units and stores them in unitsForCurrentGroup.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top