Hello All, I'm trying to setup a form that will be a general Search form for our App... I want a grid on it to display data that will be pass into the form via a function. What is being passed in is a BindingList of data, however, it could be for any of our classes... I do NOT want to display all of the fields/Columns for the data classes. I have a way of determining which fields/columns to display for each class. Now here's my question...Is there a way to programmatically set the grid's Data Schema at runtime in a form's function that we call to do a search???
Within all of our collections/BindingList, we have another collection of ONLY the field/Columns that we want to display on this grid, so I can iterate over this list and add them to the grid's data schema.. But I have NOT been able to find this in the grid anywhere... So I only need help with configuring the grid at runtime... On most of our other forms, we were able to at designtime determine what goes on the grid, and setup the grid's Data Scema accordingly, this form however, we can NOT do that, as it can be called with any class at runtime...
Thanks in advance,
Kevin Orcutt
Hi Kevin,
Can't we just assign the DataSource of the Grid to the BindingList and handle the initialize events to hide/show/customize the parts you want to modify? (InitializeLayout and InitializeRow to determine what to hide/show or take action upon).
Binding the WinGrid to a Generic List