HighTechTalks DotNet Forums  

Handles Me.ColumnChanging

Dotnet General Discussions microsoft.public.dotnet.general


Discuss Handles Me.ColumnChanging in the Dotnet General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
John Sheppard
 
Posts: n/a

Default Handles Me.ColumnChanging - 11-26-2007 , 01:56 AM






Hello all,

I am trying to place validation on my datatables columnChanging event
however the problem I am encountering is that the datasets.columnvalue lags,
that is, the first time the event runs its the old value, the second time
round its the changed value....

Should I be using the columnchanged event instead? or could this be
something to do with my binding source?

Below is my code;

Private Sub me_ColumnChanging(ByVal sender As System.Object, ByVal e As
System.Data.DataColumnChangeEventArgs) Handles Me.ColumnChanging
Dim myErrorValidator As New BL.clsErrorValidatorDataTable
Dim myRow As BL.dsBMS.tblSettingsDefaultsRow

myRow = CType(e.Row, BL.dsBMS.tblSettingsDefaultsRow)
myRow.ClearErrors()
myErrorValidator.Validate_StringEmpty(myRow,
Me.defaultAdminFeePercentageColumn, "Cant be an empty string dude")
myErrorValidator.Validate_DecimalBetween(myRow,
Me.defaultAdminFeePercentageColumn, 0, 1, "Enter a valid percentage value")
myErrorValidator.Validate_StringEmpty(myRow,
Me.defaultMarketingFeePercentageColumn, "Cant be an empty string dude")
myErrorValidator.Validate_DecimalBetween(myRow,
Me.defaultMarketingFeePercentageColumn, 0, 1, "Enter a valid percentage
value")
myErrorValidator.Validate_StringEmpty(myRow,
Me.defaultTeleFeePercentageColumn, "Cant be an empty string dude")
myErrorValidator.Validate_DecimalBetween(myRow,
Me.defaultTeleFeePercentageColumn, 0, 1, "Enter a valid percentage value")
End Sub


Thank you kindly for any ideas
John Sheppard



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.