Description:
My grid has a lookup column. I load data into the grid's and lookup's data tables inside the Form.Load event handler. But when the grid is displayed the lookup column's cells are all empty. Values are displayed when I click on a row. Why are the values not being automatically displayed?
Answer:
The cause of the problem is that lookup data is populated after the grid's data source. Earlier versions had an extra call of the LayoutChanged method, which made loading of the grid slower. However, there was no problem with the lookup editor. Now you should explicitly call the GridView.LayoutChanged method after populating a lookup dataset as shown below.
C#oleDbDataAdapter1.Fill(dataSet11, "Orders");
oleDbDataAdapter2.Fill(dataSet11, "Customers");
gridControl.MainView.LayoutChanged(); // NEW LINE
See Also:
Text disappears from a LookUp editor after focusing another grid column