I have an UltraGrid that uses a generic list for a DataSource. I update the list in a separate form and then re-attach the list to the UltraGrid's DataSource. The DataSource reflects the changes, but the grid isn't showing them. Here is my code:
List<SubtypeColorCode> subtypeColorCodes; if (this.subtypeColorCodesUltraGrid.DataSource is List<SubtypeColorCode>) subtypeColorCodes = (List<SubtypeColorCode>)this.subtypeColorCodesUltraGrid.DataSource; else //If the data source hasn't been initialized. subtypeColorCodes = new List<SubtypeColorCode>(); SubtypeColorCodeForm.ShowForm(this, new ImageServerProxy(this.tbImagingUri.Text), subtypeColorCodes); //Assign the updated subtype list back to the data source. this.subtypeColorCodesUltraGrid.DataSource = subtypeColorCodes;
Hi,
I don't see anything here that would cause the grid not to display the new data.
Can you post a small sample project demonstrating the issue so we can see what's going on?
Turns out I just need to call .DataBind() on the UltraGrid to show the changes to the data source.