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
220
Problem with validation message in Ultragrid
posted

Hi,

I am using Ultragrid (Infragistics NetAdvantage 2006 Volume 1 CLR 2.0) in winforms .net 2.0 and I have created fews columns in the grid (ugCanopySpecies) and 2 of them have following settings -

.Bands(0).Columns("AGE").MinValue = 0

.Bands(0).Columns("AGE").MaxValue = 999

.Bands(0).Columns("DBH").MinValue = 1

.Bands(0).Columns("DBH").MaxValue = 59

When ever there is wrong data entry with-in "AGE" column the grid is doing correct validation by throwing the error message as "Unable to update the data value: Value must be less than or equal to 999" but with column "DBH" whenever there is data validation problem it will say "Unable to update the data value: Value in the editor is not valid.".

I can't understand why two different error messages when every thing in scenario is same. Can you tell me what's the issue?

As of now I am showing the correct message by following way -

Private Sub ugCanopySpecies_Error(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ErrorEventArgs) Handles ugCanopySpecies.Error

Select Case e.DataErrorInfo.Cell.Column.Index

Case ugCanopySpecies.Rows.Band.Columns("DBH").Index

If e.DataErrorInfo.Cell.Column.Index = ugCanopySpecies.Rows.Band.Columns("DBH").Index Then

e.ErrorText = "Unable to update the data value for DBH column: Value must be between " & ugCanopySpecies.Rows.Band.Columns("DBH").MinValue & " and " & ugCanopySpecies.Rows.Band.Columns("DBH").MaxValue

End If

End Select

End Sub

Waiting for your reply.

Thanks,

Mandeep.