I have a data bound grid on a base form. My form that inherits from the base form sets the data source and columns. When I load my inherited form I fill the dataset that the gird is bound to. When I run the app, the inherited form displays the grid with the correct number of rows but the data is missing. The data is in the data set but it does not display in the grid. If I edit a cell in the grid the text just entered disappears when I click to another cell. Also there is one extra column displayed at the end of the grid that has no header and is not clickable. What is going on here?
ADAdministrator Syncfusion Team October 28, 2004 08:26 AM
Just a guess, but after populating the dataset and setting the datasource to the grid in the derived form, try calling grid.Binder.IntializeColumns followed by grid.Refresh to see if this takes care of this problem.
CTChris ThompsonOctober 28, 2004 08:37 AM
That worked. What was strange was this only happened when I specified bound columns.
ADAdministrator Syncfusion Team October 28, 2004 09:46 AM
If you specify boundcolumns AFTER the grid.DataSource property has been set, then that is one situation where grid.Binder.InitializeColumns is needed. Calling this method clears out the orginal columns that were set when the DataSource was assigned.