PDA

View Full Version : getting valueField of Combo in RowEditor grid



alexaung
9 Sep 2010, 12:45 AM
Hi All,

I have row editor grid. Grid has two columns, User Name and Role. Role column is combo.

Role combo store is [{"RoleID":1, Role:"Role1"},{"RoleID":2, Role:"Role2"} ]

Grid store is [{"UserName": "Name1", RoleID":1, "Role":"Role1"}]

so that dataindex of Role column in grid is Role to show the Role Name instead of RoleID. But when i add the new row into grid using row editor, added one record into grid store. But RoleID = 2 is insert into grid store's Role column.

New Grid store is [{"UserName": "Name1", RoleID":1, "Role":"Role1"}, [{"UserName": "Name2", RoleID":null, "Role":"2"}]

so how can i insert valueField into gridstore's RoleID column.

Regards,
Alex

alexaung
12 Sep 2010, 6:48 PM
Hi All,

Any suggestion or solutions?

Thanks,
Alex

vishalnnsingh
12 Sep 2010, 9:46 PM
Checkout the afterEdit event of EditorGridPanel.
You get the record set, by which you can get and also set the value of the fields of that record

Condor
12 Sep 2010, 11:15 PM
Small correction: The event is called 'afteredit' (small e).