Announcements
Hello,
I am using a multiselecthelper to iterate through a selected records in a grid. The problem i have is that it works when i actively multi select the records (blue color) but it doesnt work when i click directly on the "all" checkbox. It results on all the records selected (grey color). I can put some code but to be honest the multi select part is quite generic.
For some reason the grid is not catching all the records if i don't click on it. Is there any known bug?, some property maybe? I compared to other standard forms and i don't see the difference.
Thanks in advance.
Oh - I guess it's a standard behavior of multiselect helper class - I also tested with multiselect helper class and it's not looping the record if I select all the records.
Thanks,
Girish S.
Hello GirishS,
Yes, I compared the forms and i don't see the difference. The problem (in my case) on looping all the datasource is that sometimes there are records in the datasource that i don't want to use in the loop, thats why i was trying to use the multiselect helper, this way i can multiselect some items, not all.
I am not sure its related to the grid properties. Have you compare the grid properties with RetailAddItems and your form.
I also tested with multiselect helper class its not looping when we select all the records.
But the code I have pasted is looping even though if you select all the records.
Thanks,
Girish S.
Hello, thanks for the answers.
I tried all your contributions without success. I think the problem is related to the grid properties.
I currently have a button to the action panel linked to the grid, with the next code in clicked() method (names are generic)
MultiselectionHelper helper = MultiselectionHelper::construct(); Table tmpTable; helper.parmDatasource(Table_DS); tmpTable = helper.getFirst(); while(tmpTable) { //Some Logic tmpTable = helper.getNext(); }
I must say, the loop works when the selected records in the grid are highlited in blue color but for some reason when i click the "select all tick" it only gets the first record even with all the records selected (highlited in grey color) .
I am not sure is the standard behaviour because the "RetailAddItems" form works fine.
Regards.
I checked multiselect helper doesn't loop if you select all records in the grid. I think this is the standard behavior.
If you want that to work use DataSource getFirst and getNext method instead of Multiselect helper class.
TableName tableName; tableName = DatasourceName_ds.getFirst(true); while(tableName) { //do some logic here. DatasourceName_ds.getNext(); }
Thanks,
Girish S,
Hi Eisenberk,
Can you explain with the screenshot of the form?
Also, can you paste the code for multiselect helper?
Thanks,
Girish S.
André Arnaud de Cal...
293,296
Super User 2025 Season 1
Martin Dráb
232,093
Most Valuable Professional
nmaenpaa
101,156
Moderator