During setting the DataSource to the grid, the grid retrieves the GridBoundColumn property descriptors directly from the DataSource where the type is still ProprtyDescriptor.
One way around this problem might be to save the GridBoundColumn pd's before setting the DataSource, and restore them afterwards. Here is some code that seemed to work OK in that sample.
Hashtable savePDs = new Hashtable();
GridBoundColumnsCollection gbcc = this.gridDataBoundGrid1.GridBoundColumns;
if(gbcc.Count > 0)
{
foreach(GridBoundColumn gbc in gbcc)
savePDs.Add(gbc.MappingName, gbc.PropertyDescriptor);
}
this.gridDataBoundGrid1.DataSource = dt;
if(savePDs.Count > 0)
{
foreach(string s in savePDs.Keys)
gbcc[s].PropertyDescriptor = (PropertyDescriptor) savePDs[s];
}
savePDs.Clear();