After setting up my grids at design time, if a few months later somebody adds a property to the datasource object it will automatically appear in the grid. Is there an attribute or something we can add to the properties that we don't want to show in the grid?
Hello,
Depending on what type of datasource you're using, you might be able to hide specific fields. There's a good way to do it in the grid, though, which is independent of the type of datasource you use.
After binding the grid, loop through the columns in each band and set the column's Hidden property to false. Then, set Hidden back to true for the specific columns you want to show. If new columns are added to the data source, they'll be picked up by the initial loop and hidden, but won't be set back to visible unless you modify the code to do so.
Please let me know if you have any questions.
I understand we could do that through code. We have thousands of ultragrids and ultracombos that we setup in design time. So if your suggestion is the only way to do it, then what is the point of setting everything at design time and getting everything perfect then having to add a new property to an object throws off every grid or combo that we have created based on that object. It just seems like there should be a way after setting up the grid, that it will lock it to look the way we want. Is there something simple like adding an attribute to the objects property that tells infragistics to ignore the property.