Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Inherited winGrid, NewBandLoadStyle, NewColumnLoadStyle, when to implement
posted

I'm inheriting a winGrid, binding to BindingSource, using LinqToSQL and EntityFramework. Works GREAT, a boon to production.

In design, I setup my display of bands/columns either the the designer or thru InitializeLayout and all is fine.

If I later update my linq dbml file with new properties (columns in grid) and/or associations (bands in grid), I DON'T want those new columns/tables to change the structure of my grid automatically. So I've set the NewBandLoadStyle and NewColumnLoadStyle to HIDE in my INHERITED control's NEW constructor.

But I really don't want it on NEW, because I'd like to see all of the columns/bands in the designer when I design the grid. And if later, after I've already done my design work on the grid, I alter the dbml file, I don't want those changes to add it's new columns/bands to the grid.

The question is...  on what grid event should I set NewBandLoadStyle and NewColumnLoadStye to HIDE? I only want this these two properties to kick in on subsequent design of the grid (after a dbml object was altered), wherein I would manually show the new columns/bands as appropriate.