Another datagrid question.
Briefly I need to copy some values from one datagrid (DG1) to another datagrid (DG2).
So I’ve copied the original values in DG2 into ‘theDataA’ and then added the values from DG1.
I’ve then updated DG2 with:
set the dgdata of group "DG2" to theDataA (I’ve also tried dispatch and send).
This all works absolutely fine as far as the contents of DG2 are concerned.
The problem is that there are two columns with option menus in DG2 and when I update DG2, it refreshes and resets these menus to the first option.
I’m not sure how to keep the menus at their initial value or how to reset them after the refresh?
Any help would be great. I'm stumped.
Datagrid refresh resets option menus
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Datagrid refresh resets option menus
Here is my favorite response to datagrids:
I use them, but do not understand them.
However, it should be possible to save the menuHistories of the option buttons in a custom property and restore them after you refresh the whole DG. You will have to go inside the row template group script, I think.
Craig Newman
I use them, but do not understand them.
However, it should be possible to save the menuHistories of the option buttons in a custom property and restore them after you refresh the whole DG. You will have to go inside the row template group script, I think.
Craig Newman
Re: Datagrid refresh resets option menus
Hi Duke,
sounds like you do not update the datagrid array data to the new selected labels/menu items of your menu buttons.
Couple of questions:
1. Do you have a routine in the "fillInData" handler of your datagrid that will set
the LABELS of your option menus according to the values in the array?
2. Do you have a "menupick" handler in your datagrid behavior (or the buttons tehmselves) that will SET these values
in the datagrid array, when the user selects any menu item from your option menus?
Best
Klaus
sounds like you do not update the datagrid array data to the new selected labels/menu items of your menu buttons.
Couple of questions:
1. Do you have a routine in the "fillInData" handler of your datagrid that will set
the LABELS of your option menus according to the values in the array?
2. Do you have a "menupick" handler in your datagrid behavior (or the buttons tehmselves) that will SET these values
in the datagrid array, when the user selects any menu item from your option menus?
Best
Klaus
Re: Datagrid refresh resets option menus
I don’t think I’ll ever actually understand how datagrids work, but so long as I can get them to work, I can live with that .
Klaus, I didn’t have any of those routines in my scripts, but I’m playing around with that idea now and having some success.
Thanks
Klaus, I didn’t have any of those routines in my scripts, but I’m playing around with that idea now and having some success.
Thanks
Re: Datagrid refresh resets option menus
Hi Duke,
Come back if you have more and/or specific questions!
Best
Klaus
great!DukeUK wrote:Klaus, I didn’t have any of those routines in my scripts, but I’m playing around with that idea now and having some success.

Come back if you have more and/or specific questions!
Best
Klaus