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
725
How to get underlying datarow in order to use datacolumn.SetColumnError
posted

Hello,

 I have setup an ultragrid, bound to a datasource with data table and set the related ultragrid.displaylayout.override.SupportDataErrorInfo = CellsOnly.

Furthermore, I have added event handlers for event "DataColumnChangeEventHandler" to capture data column changes on level datasource. This handler points to my sub routine in order to check if mandatory columns are really maintained and to fire SetColumnError if the check failed. The Ultragrid is displaying the icon within the ultragrid cell.

 I only have a problem if e.g. five columns are available in a row, two of them are mandatory columns, the row is added and the user is entering valid value only to the first mandatory column but nothing to the second one and is leaving now the row. In this case, I like to check the complete row and to set the error on datarow level for each column which are mandatory.

I tried it with usage of event "DataRowChangeEventHandler" but this event will be fired on level datasource not each time, especially if the user is entering in the first column and leaving now the row. I also checked the other way of using the ultragrid event "BeforeRowUpdate". Here, I only have access to e.row that means to the current ultragrid row but how can I get from there the underlying datarow which will be updated next or how can I set the error provider without using the datarow related SetColumnError function?

Yours
Stephan

Parents Reply Children
No Data