I have created custom property and bind it to xtragrid.column. Error provider for this property doesnt be shown when I save data. It works for other property (mapped to data)
Any ideas?
Thank you
'-- Return the error for the given field If Me.BrokenRules.Contains(Me.CurrentRowIndex, columnName) Then Return Me.BrokenRules(Me.CurrentRowIndex, columnName).Description ElseIf Me.CurrentDataTable.Columns.Contains(columnName) Then Return Me.CurrentRow.GetColumnError(columnName) Else Return String.Empty End If
So, if the BrokenRules collection has an entry for the current row and "ItemCode", then it will return the description in the broken rule. Otherwise, it checks the underlying DataTable for errors, then just returns an empty string. Since your custom field does not exist as a column, the second condition will never be hit, so you have to verify that the broken rule is being added properly.
You can use the ToArray() method on the BrokenRules to see all of the rules in the collection and make sure that you're rule is in there for the "ItemCode" property.