Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
245
Bound cell with image not repainting
posted

I have an UltraGrid with a cell that displays an image which dynamically updates based on the bound value.  To bind the data, I create a custom object and put it in a Binding List.  I am using an UltraData Source to define the schema, and then I set the data binding by:

UltraGrid.SetDataBinding(myBindingList, null, true);

Then I assign a ValueList containing the images to the grid like this:

private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{

 ValueList valueList = e.Layout.ValueLists.Add("Images");

 ValueListItem vli = valueList.ValueListItems.Add("Active");
 vli.Appearance.Image = imageList1.Images["Active"];
                   
 vli = valueList.ValueListItems.Add("Inactive");
 vli.Appearance.Image = imageList1.Images["Inactive"];
 e.Layout.Bands[0].Columns[0].ValueList = valueList;
}

The problem is that when the underlying data changes, the image does not always repaint, however by invalidating the area (such as Mouse Over) the image then changes.  Much of the time this works as expected, it is only occaisionally that the image does not change when it should.

Is there a step I am missing?

Thanks!

Bill