PDA

View Full Version : Combobox with different value on each row of a grid



rimbaudsolaris
19 May 2010, 10:13 AM
A user contains a list of roles
I'd like to display a list of user in a grid and for each user to have a combo box for the roles which belong to the user


My definition reader is below

var store = new Ext.data.Store({
url: '<c:url value="/comref/jsonSybilUsers.do"/>',

reader: new Ext.data.JsonReader({
root: 'users',
id: 'id',
totalRecords: 'rows'
}, [
{name: 'id', mapping: 'id'},
{name: 'userFirstName', mapping: 'userFirstName'},
{name: 'rolesName', mapping: 'roles', type: 'array' }
])
});

the roles contains all the roles for a user

thx for your help

Keylan
19 May 2010, 12:18 PM
Not sure if I am understanding you quite correctly, but it sounds like you want to have a combobox that displays a different list depending on the row in the grid. If this is the case, I would suggest having one combobox that reloads its store's contents on the expand event, depending on which row's combobox was clicked on.