Issues with combo boxes on a grid.

serenity_now

Active Member
Basically, I need a combo box on each row of my grid. This combo box displays 7 days, and it is populated based on whatever week number the user selects on a interconnecting form.

I am having terrible difficulty getting this to function properly. I am using the "Row is Entered" event for the grid event rules and doing my ER logic here. I am using a while statement to loop through the days and then using the "Add Item" Combobox function to add items to my combobox.

My issue is when you go to this form the combo box is greyed out, if I hop to row 2 then back to row 1 I can finally select one of my values which is correctly populated. If I then try to enter something on row 2 combo box I get all kinds of duplicate key error message prompts. It seems it doesnt like me using the same keys on each row. The key represents the day of week (0-6) so it has to be the same on each row.

Does anyone who has battled with combo boxes know what I am talking about, and the best way to approach this? Boiled down my issues are I need to somehow use the same combo box values on each row of grid and I need the box selectable right away.

Thanks for any help, and sorry if I have confused the heck out of you.
 
Can you move your code to the "Write Gride Line-After" event. I have a drop down in a grid that gets populated dynamically at run time and it works just fine with the code in this event.
 
Back
Top