I use ext:RowEditor in Plugins for Gridpanel. In <Editor> I put ext:ComboBox. When I select some text in combo and click Update in grid I see value of selected item. How can I set to see selected text from combo?
Thanks!
Printable View
I use ext:RowEditor in Plugins for Gridpanel. In <Editor> I put ext:ComboBox. When I select some text in combo and click Update in grid I see value of selected item. How can I set to see selected text from combo?
Thanks!
Hi,
Please see the Department column here:
https://examples1.ext.net/#/GridPane...Field_Mapping/
Thank you! That is solution.
Hmm, but now I have problem with inital rendering. When grid inital shows there is no text in column. In debug I saw that problem is on call function :
Code:var departmentRenderer = function (value) {
var r = StoreCombo.getById(value);
if (Ext.isEmpty(r)) {
return "";
}
return r.data.Name;
};
"value" gets the text of DisplayField from comboboxCode:var r = StoreCombo.getById(value);
Then you should:
1. Set up a respective field as an IDProperty of Store's Reader. Then set up that field as a DataIndex of a ColumnModel's Column.
or
2. Find a record in a different way.
Code:var findRecord = function (store, prop, value) {
var record;
if (store.getCount() > 0) {
store.each(function (r) {
if (r.data[prop] == value) {
record = r;
return false;
}
});
}
return record;
}
var r = findRecord (StoreCombo, ComboBox1.displayField, value);
In my case I need to put in Window where is my grid refresh because on initial show window code don't show text in grid column
Code:<Listeners>
<BeforeShow Handler="refreshGridView()" />
</Listeners>
Maybe this someone helps to shorten the hours of effort.Code:function refreshGridView() {
#{GridPanel1}.getView().refresh();
}
Thanks for the update.
P.S. Providing a full sample to reproduce a problem always gives you the best chance to get a solution as soon as we can.