Hi there,
Probably you have seen this question more than once, but this is really critical for our business now.
We have to buy a new set of controls to enrich our user experience. I have been testing with WinGrid, but it has a very specific problem: it autogenerates columns.
Our database generation tool automatically creates views of underlying tables, which makes it have a lot of columns (in some case above 250). I don't have the time to hide all those fields manually.
Is there a way to disable the auto generation of columns, like the DataGridView does?
Yes, you can do that in the grid desiger. Click the Start button on the grid and go to the Band and Column Settings. Expand that, go to the band you want and select "Columns".
This gives you a list of columns and you can mutli-select and apply properties, just as you would in the form designer.
I meant that I had like to be able to select more than one column in de grid's designer tool. When you for example can select all columns at once and change the required property that it solves a lot of my problems.
See for example the behaviour of the Windows Forms designer: select two labels and the property dialog shows all common properties. They can be edited at once, affecting both controls.
Do you get the point?
Hi Patrick,
I'm not sure what you are asking. No matter how the data source gets generated, at some point, you have to know which columns to display in the grid. If you want to do this at design-time and then have the grid display only those columns you set up, thenyou probably want to go with option 2 in the list I gave you above.
I'm not sure where disabling columns or multiselection of rows comes into this.
Hi Mike,
Thank you for your suggestions. I am not all satisfied with the options. Is there a way to make it easier to disable columns (like multiselect of rows in the designer, so I can edit the visible property at once)?
The business objects I use come from our own autogenerated O/R-mapping code, with an autogenerated database.
So when you have for example Projects as an entity, sometimes you just want so show the name with the customer of the project. Another time you had like to show the financial aspect of the project. These are all caught in one database view, which map to one entity on the .net code side. So a Browsable(false) property isn't an option.
Can you tell me something about the possibilities of above suggestion about designer optimalization?
Thanks,
Patrick
The attribute that hides a field is:
[System.ComponentModel.Browsable(false)]