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
260
Set cells in errors
posted

Hi,

I am using an UltraWinGrid which is binded with an object that inherit the ITypedList and IBindingList interface. This object contains a PropertyDescriptorCollection where each PropertyDescriptor represents a column of the grid.

The display and the basic edition of each cells works fine.

But, I would like to add the capability to set a cell in error if, for example, the value is out of bounds. Note that even if the value is out of bounds, the value is set in the data side and the user can continue to edit the cell. In this case I just want to set a different back color for the cell and put a warning icon.

I found some posts talking about the IDataErrorInfo interface. I fully understand the part describing how to customize the error displaying, but I need some help on how to set a cell in error state on the binding side.

Does my binding object have to implement the IDataErrorInfo ? or maybe each PropertyDescriptor objects created by the binding object ? And then how to say concretely that a cell is in error.

Thanks

Jean-Charles Durand

Parents Reply Children
No Data