SmartClient Version: v13.1p_2024-11-16/Enterprise Deployment (built 2024-11-16)
I can confirm it's working, thank you very much
Announcement
Collapse
No announcement yet.
X
-
hi Claudio - sorry for the confusion. In the end, it's not appropriate for the selection to always be applied automatically by calls to select/deselectAllRecords() - so, we've backed that change out and instead exposed PickListMenu.applySelection(), which you can call manually to apply the current pickList selection to the formItem.
Code:// toggle selection of everything in the list var item = testForm.getField("multipleSelect"); if (item.pickList.anySelected()) item.pickList.deselectAllRecords(); else item.pickList.selectAllRecords(); item.pickList.applySelection();
Leave a comment:
-
SmartClient Version: v13.1p_2024-11-11/AllModules Development Only (built 2024-11-11)
Hello, I see that the problem of post #1 is fixed, thank you very much.
Regarding selection and deselection, I'm not sure if I fully understand your last two posts, but I noticed that while selectAllRecords() updates the item value, deselectAllRecords() does not. So is it actually intended to work like this? So to deselect I'll have to do item.setValue([]) ?
Leave a comment:
-
hi Claudio - in our example code, we showed using deselectAllRecords(), but note that we subsequently disabled this directly updating the item-value because it could run before draw and broke some internal autotests. We'll rework and reinstate it for tomorrow's builds.
Leave a comment:
-
A quick follow-up - we've made a tweak so that calling pickList.select/deselectAllRecords() directly will update the item automatically, without running through setValue() and eventually moving/resizing the pickList. Please retest with tomorrow's builds.
Code:// toggle selection of everything in the list var item = testForm.getField("multipleSelect"); if (item.pickList.anySelected()) item.pickList.deselectAllRecords(); else item.pickList.selectAllRecords();
Last edited by Isomorphic; 6 Nov 2024, 03:25.
Leave a comment:
-
hi Claudio, apologies for the silence on this one. We've made a change to address this issue in tomorrow's builds - for the moment, you'll still need to call setValue(), something like
Code:var item = testForm.getField("multipleSelect"), item.setValue(item.pickList.getData().getProperty("itemID"));
Leave a comment:
-
Hello, any news about this issue? At least that about selectAllRecords() which in fact solves also the button resize problem.
Leave a comment:
-
Ah, a quick follow-up - selectAllRecords() does select all the records in the pickList, but doesn't apply them to the item.
Leave it with us, we'll take a look at both and get back to you.
Leave a comment:
-
hi Claudio,
It does look like there might be a framework issue here, where perhaps a grid with no fixed width overflows to fit data may not notify custom members of the resize. We'll take a look.
In the meantime, one workaround would be to apply a fixed pickListWidth. Also, if all you want to do here is select all the items, you can just call item.pickList.selectAllRecords() - that way you don't call setValue() and cause a pickList hide/show, so you won't get the button resize.
Leave a comment:
-
problem with custom inline control
SmartClient Version: SNAPSHOT_v13.1d_2024-07-09/AllModules Development Only (built 2024-07-09)
Hello, I just noticed that if I configure a custom inline control for a SelectItem like this:
Code:isc.DynamicForm.create({ ID: "testForm", width: 400, fields: [ { name: "multipleSelect", title: "Select items", editorType: "SelectItem", optionDataSource: "supplyItem", optionCriteria: {units:"Ream"}, displayField: "itemName", valueField: "itemID", multiple: true, pickListProperties: { gridComponents: [ isc.ToolStrip.create({ height:30,autoDraw:false, width: "100%", members: [ isc.ToolStripButton.create({ width:"100%", icon: "[SKIN]/actions/approve.png", title: "Check All", click:function() { var item = testForm.getField("multipleSelect"), fullData = item.pickList.data, cache = fullData.localData, values = []; for (var i = 0; i < cache.length; i++) { values[i] = cache[i]["itemID"]; } item.setValue(values); } }) ] }), "body" ] } } ] });
but after clicking "Check All", it shrinks like this:
is it a bug, or am I missing something?Tags: None
Leave a comment: