There are many methods to indicate errors in RadGridView. However, until now it didn’t support the most natural and easy way for this - the IDataErrorInfo interface. Things have changed, so let me show you how to use this interface.
As MSDN says,“IDataErrorInfo provides the functionality to offer custom error information that a user interface can bind to.”
Actually, you don't need to know anything about this interface. You can just set the ErrorText property of the desired row or cell:
RadGridView will automatically display error indication at the beginning of the row and will set tooltips. You can also use the ContainsErrors property which indicates whether a cell or row contain errors. You should handle the CellFormatting event in this case:
However, when you want to display help information based on some condition, you should implement the IDataErrorInfo. In that case you have to implement only two properties:
I hope you like this feature. If you have any comments or ideas we will be glad to hear them.
Nikolay Diyanov Diyanov is the Product Manager of the Native Mobile UI division at Progress. Delivering outstanding solutions that make developers' lives easier is his passion and the biggest reward in his work. In his spare time, Nikolay enjoys travelling around the world, hiking, sun-bathing and kite-surfing.
Subscribe to be the first to get our expert-written articles and tutorials for developers!