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?
YoursStephan
Hello Mike,
great, that's what I need.
Thanks,Stephan.
Hi Stephan,
Use e.Row.ListObject to get the underlying data source object for a grid row.