This is a migrated thread and some comments may be shown as answers.

Cell Refresh

1 Answer 44 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mike Chidsey
Top achievements
Rank 1
Mike Chidsey asked on 30 Mar 2010, 07:58 PM
I have a column in my grid that is bound to an object.  The column is a custom one and I override the CreateCellElement method to handle the display.  The display value is a property of the object, Portion.  Whenever there is a changed value, I display an icon in the cell to indicate that it is dirty. There are other properties on the object, OfficeID and IsPrimary.  These are bound to a combobox and checkbox that are located outside the grid.  I set the binding for these in the CurrentCellChanged event.  All this is working fine.  The problem is when I make a change to the combobox or checkbox I'd like to display the icon.  I can't seem to force the cell to refresh.  My object supports INotifyPropertyChanged and I'm faking a change in the value bound in the grid cell (Portion) when there is any change.  Is there something else I can try?  I'm thinking since I'm using the CreateCellElement method that maybe the change event isn't getting to the cell properly.  Any ideas?

 I've attached a screen shot showing what the grid looks like.

1 Answer, 1 is accepted

Sort by
0
Mike Chidsey
Top achievements
Rank 1
answered on 31 Mar 2010, 03:30 AM
I solved it by binding the Image control to a property on my object.  Works good now....
Tags
GridView
Asked by
Mike Chidsey
Top achievements
Rank 1
Answers by
Mike Chidsey
Top achievements
Rank 1
Share this question
or