Hi, this new functionality on forms is kind of cool but I’m not sure how to use it.
Could anyone, please, explain because I can see that onDrag is fired as expected but that’s about it.
What kind of elements can I drag and drop?
I actually faced these questions when I wanted to run a method whenever the user drags a column by its header in tableview and drops it.
However, even onDrag does not seem to work on table headers (I’ve got labelFor labels in tableview).
Is onDrag and onDrop expected to work on labelFor labels in tableview?
what you drag is up to you.
If you can an onDrag then you can say ok i want to drag value X or record Y
then in onDrop you do your stuff with that value in the drop target.
headers are not supported as drag starts because those have there own drag stuff
and we currently dont tell you that it is dropped on the header of the tableview.
jcompagner:
headers are not supported as drag starts because those have there own drag stuff
and we currently dont tell you that it is dropped on the header of the tableview.
Thanks Johan.
Does it mean that there is no way to run a method when a column is repositioned in tableview?
jcompagner:
headers are not supported as drag starts because those have there own drag stuff
and we currently dont tell you that it is dropped on the header of the tableview.
Thanks Johan.
Does it mean that there is no way to run a method when a column is repositioned in tableview?
Cheers,
Maria
Exactly. What would you like to achieve with such an event ?
jcompagner:
headers are not supported as drag starts because those have there own drag stuff
and we currently dont tell you that it is dropped on the header of the tableview.
Thanks Johan.
Does it mean that there is no way to run a method when a column is repositioned in tableview?
Cheers,
Maria
Exactly. What would you like to achieve with such an event ?
I would like to save the location of the columns in the grid, so they stick.
I wouldn’t like to do it in onUnload, because in smart client the forms are loaded and unloaded a lot, there would be a lot of overhead.
i think the overhead is not that much, especially if you give the clients more then 100MB (64 forms) or more then 200MB (128 forms) of memory to allocate.
It looks weird to me that every show of a form that the client does after it loads the max amount of forms will result in a new form being shown instead of one of the forms already loaded
The least used form is then unloaded yes but that would mean that you have to store the sizes of 1 form when you show 1 form. That overhead is negligible compared to the rest you are loading.
Besides that what you could do is keep the sizes only in memory…
So you load a form for the first time then you ask a global method for the sizes of that form
That will check a cache if not in the cache it will load from the db and caches it
when the form is then unloaded you just update the cache.
The save of that you do in onsolutionclose or when the cache updates for the X number of times.
jcompagner:
i think the overhead is not that much, especially if you give the clients more then 100MB (64 forms) or more then 200MB (128 forms) of memory to allocate.
It looks weird to me that every show of a form that the client does after it loads the max amount of forms will result in a new form being shown instead of one of the forms already loaded
The least used form is then unloaded yes but that would mean that you have to store the sizes of 1 form when you show 1 form. That overhead is negligible compared to the rest you are loading.
Besides that what you could do is keep the sizes only in memory…
So you load a form for the first time then you ask a global method for the sizes of that form
That will check a cache if not in the cache it will load from the db and caches it
when the form is then unloaded you just update the cache.
The save of that you do in onsolutionclose or when the cache updates for the X number of times.