Feb 27, 2016, 8:03 AM
[CLOSED] Updating Store from Selected Record in GridPanel
Hi
I'm sure there must be a simple solution to this but I've spent so much time trying to find it that I need some help.
I have a GridPanel with a Store and I'm using data from that Store to render a ColorPicker
Thanks for your help
Jeff
I'm sure there must be a simple solution to this but I've spent so much time trying to find it that I need some help.
I have a GridPanel with a Store and I'm using data from that Store to render a ColorPicker
Html.X().Panel().Layout(LayoutType.VBox).Width(70).Cls("borderless-panel").Height(120).Hidden(!(bool)SessionHelper.Clients).Items(
Html.X().DropDownField().ID("VAColour").PickerAlign("bl").Width(50).Height(30).MarginSpec("10 0 0 0")
.Component(c => c.Add(
Html.X().Container().Height(200).Width(30).AutoScroll(true)
.Items(
Html.X().ColorPicker().ID("VA").Width(55).Listeners(l => l.Select.Fn = "colourPickSelectHandler")
)
)
),
The initial colour of the ColourPicker is set like this: var selectedRecords = grid.getSelectionModel().getSelection();
selectedData = selectedRecords[0].data;
App.VAColour.inputEl.setStyle('color', '#' + selectedData.VAColour);
When the user selects a different colour I want to be able to update VAColour
in the store. I realise I can't just set selectedData
but I can't find a way to update the store. It's really frustrating because none of the Ext.js methods seem to work!Thanks for your help
Jeff
Last edited by fabricio.murta; Mar 22, 2016 at 11:20 PM.
Reason: no user feedback for 7+ days