In my application, most of my grids are wired up to a typed dataset.
On various occasions many of the grids lose their settings - headers are reset, hidden columns no longer hidden, combo boxes no longer embedded, cell color settings, etc. I can't really nail down any consistent trigger but it appears to happen more often after making a change to the underlying dataset - adding a column, etc.
This is causing me quite a bit of work to go back and reset everthing back to the way I like/remember and makes me nervous about continuing to use the UltraGrids in this manner.
Anybody else experiencing similar problems? Is there a way I can "lock" a grids setting?
Thanks
Hi,
This KB article might help.
HOWTO:How can I define columns in the grid at Design-time and bind them at run-time so that some fields of the data are excluded from the grid?
The grid will lose it's layout if you bind it to a DataSource that doesn't match the current layout. And keep in mind that if your grid is bound at Design-time, then essentially every time you open the form designer, the grid is getting re-bound to the data source.
What version of the grid are you using? We've made some improvements over the years to make this work better and be more stable, so upgrading to the latest version of the grid or even the latest service release for the version you have might help.
You could also save the grid's Layout to a file using the Layout wizard and keep it as a backup.Then if something gets lost, you just re-load the layout.
Personally, I find the visual Studio design environment a little bit unpredictable, so I like to use the InitializeLayout even to the grid to set up my layout in code. That way it never gets lost. The down side, of course, is that there are some things that are very hard to do in code and really require a visual designer, like setting up RowLayouts, for example.
>>What version of the grid are you using?
10.1.20101.1007
>>You could also save the grid's Layout to a file using the Layout wizard and keep it as a backup.
I saw this mentioned in another post the other day and I looked all through the designer trying to find this feature...just now, after your comment, it finally dawned on me to try right-clicking on the grid...and there it is. It might be a good idea to place this link somewhere in the designer as well - at least the "Save" part - since many of us are accustomed to using this dialog to accomplish most tasks.
>>The down side, of course, is that there are some things that are very hard to do in code and really require a visual designer, like setting up RowLayouts, for example.
Right. If I have to resort to coding all of this manually then I don't think I will be using the IG grid control in my applications :)
Thanks again Mike
If you still want I will be glad to open a support ticket for you and look into your case deeply (we may continue and this discussion if you desire) and check what the reason for this behavior might be. If you agree, I would need more details as a sample or exact steps how to reproduce the described.
Let me know your decision.
Regards,
Stefaniya
Have you opened a support ticket on this issue for anyone? I see post ranging from 2009 to 2010 on this issue. Now I am having the same issue in 2011 with version 10.3.20103.1000
Thanks for your feedback.
Let me know if you need my assistance at any time.
Sincerely,
Thanks Stefaniya...but at the moment I don't have a reliable way of reproducing the issue. I even went as far as making a backup copy of my project and tried to modify datasets and such to try and force it to happen but could not replicate the issue - however, I did not spend much time doing this.
I will keep an eye on things and next time it happens will try and recall previous activities that could have triggered the lost formatting.