Populating an option menu in a datagrid table
Posted: Fri Nov 27, 2009 12:51 am
Trying to figure out the best way to populate the contents of an option menu in a datagrid column. I have two scenarios.
First scenario is that the data in the option menu needs to be populated once when the card opens and won;t change again until the card is closed and opened again. I'm looking for the best place put the population code so it only gets executed once when the card opens. Feels like the option menu in the Row Template is what should be populated so that I don;t have to populate each copy of the option menu that is displayed in the datagrid. Would that perhaps be a custom behaviour for the option menu?
Second scenario is that the the contents of the option menu in column B changes dependant on the data entered by the user in column A (column A is also an option menu but it's contents fall under the first scenario). I guess the code to do this would be in a menuPick handler for column A, but I'm having a hard time trying to figure out how to refer to the option menu in column B of the same line as column A
First scenario is that the data in the option menu needs to be populated once when the card opens and won;t change again until the card is closed and opened again. I'm looking for the best place put the population code so it only gets executed once when the card opens. Feels like the option menu in the Row Template is what should be populated so that I don;t have to populate each copy of the option menu that is displayed in the datagrid. Would that perhaps be a custom behaviour for the option menu?
Second scenario is that the the contents of the option menu in column B changes dependant on the data entered by the user in column A (column A is also an option menu but it's contents fall under the first scenario). I guess the code to do this would be in a menuPick handler for column A, but I'm having a hard time trying to figure out how to refer to the option menu in column B of the same line as column A