Replies
Thanks for following up Mike! The current solution seems to be working well, but it's good to know some alternative possibilities if needed.
Mark
Ivan & Mike,
I have finally found the solution!! In my last comment I attached a document with my code which was in the InitializeTemplateAddRow event. The problem is that the first time I select a row in the UltraCombo grid, it fires the InitializeTemplateAddRow event again – so it reloads & resizes the UltraCombo grid – and that was what I was seeing that cleared out my first selection. I have moved my code into the UltraGrid’s InitializeLayout, but I had to add a check to see if the CheckBox column was already there. If I don’t, it tries to add it again whenever the InitializeLayout event fires again and gets an error that the Key already exists. Hopefully, all that makes sense. I have included the attachment again with new & old code if you care to look at it. Thanks for all your help with my issues!!
Mark
Attachments:
Ivan,
I do have one more issue with the UltraCombo within the UltraGrid – see the screen shots in the attached document. After I click the dropdown to bring up the grid of states, it looks fine, but on the FIRST click on a checkbox (AK in the first screen shot) it quickly checks the checkbox, puts the “AK” in the editor, unchecks the checkbox, and then seems to resize the columns. After the first click (see second screen shot), it works exactly as I would expect – in this case I select Alabama & Arkansas and both are checked and both values are in the editor. Is there some event that would be firing for only the first click or some property that I should be setting?
Mark
Ivan,
Thanks for your example code, it was very helpful and got me most of the way to getting things working.
There were a couple of differences that I wanted to record here in case others run into the same situations.
1. Your example had the code in the Form_Load event, but I needed it to be elsewhere because my grid is populated based on another selection on the page, so I had to put my code into the grid_InitializeLayout method. The problem with that is that event is called multiple times so I was getting an error trying to add the checkbox column again and again with the same column name.
2. One difference in my situation is that I want the checkbox column only used in a template row (for adding a new row to the grid). Since that is only done once, I was able to overcome issue #1 by moving the sample code to the grid_InitializeTemplateAddRow() method.
Thanks again for your help! I will mark your response as the answer.
Mark