I have a detail form from where I can open a table view form with the same foundset as the detail view. So the user can cursor through the table and select the record to view in the details form.
I also have multiSelect = true on that table form, and the user can select multiple rows then a button runs code to ensure both forms show only the selected records.
On the details form the user can clear the record selection and it will reload all records to both forms.
On opening the table view after reloading all of the records or after a multi-select has already been performed, the multiSelect is not available on the table form. Using the Shift and Mouse initially colours the rows selected (or at least 1 column of the rows) but then reverts to highlighting only the currently selected row. No multiSelect possible?
Tried: setting the multiSelect to false then reset it to true on form OnShow
Any one come across this before? Is it possible to unLoad this form and have it re-initialised next time its used?
Gabi Boros:
is this in the smart or web client ?
if it’s in the web, doing a refresh of the page with the multiselect table view does
fix the selection ?
if you have a sample you may upload here or create a case with it
Sorry Gabi - been travelling and missed your response yesterday.
Its in Smart Client and I cant at the moment split out a sample from our solution as its intricatly woven in. In our model right now we have two forms - one detail and the other a table.
I open the table form and allow a multiselect and using this code below set the foundset of the other form (detail)
var recordsToView = foundset.getSelectedIndexes()
var args = new Array()
for(var i=0; i<=recordsToView.length-1; i++)
{
foundset.setSelectedIndex(recordsToView[i])
args[i] = foundset.fc_id
}
var _argString = args.map(function() {return '?'}).join(',');
//Set Globals for use elsewhere to limit to this search
globals.fabricSearchArgString = null
globals.fabricSearchArgs = null
globals.fabricSearchArgString = _argString
globals.fabricSearchArgs = args
var sqlFabric = "SELECT fc_id FROM fabric_condition WHERE fc_id IN (" +_argString + ")"
var fabricDataset = databaseManager.getDataSetByQuery(globals.vServerToUse,sqlFabric,args,-1)
forms.fabman_frm_detail.foundset.loadRecords(fabricDataset)
forms.fabman_frm_table.foundset.loadRecords(fabricDataset)
forms.fabman_frm_detail.foundset.sort(foundset.getCurrentSort())
forms.fabman_frm_table.foundset.setSelectedIndex(1)
forms.fabman_frm_detail.foundset.setSelectedIndex(1)
This all works as expected.
After the user is done with the search and deatail review he calls a foundset.loadAllRecords() on both the detail and the table forms. When viewed the table form is back to full listing of all records as expected. But the table form will then not accept a multi-select but only allow a single record selection?
The table form will not then accept a multi-select until the solution has been closed and reopened???
I did created a sample based on your description, but the multi-select
remains, also, it is very strange, that even when you set the foundset to multi-select
onShow, it’s ignored …
maybe you could also create a simple sample that is similar with what you have in your
solution, to check if you see the issue, and then upload here