Hello all,
I am trying to place validation on my datatables columnChanging event
however the problem I am encountering is that the datasets.column value 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_ColumnChangi ng(ByVal sender As System.Object, ByVal e As
System.Data.Dat aColumnChangeEv entArgs) Handles Me.ColumnChangi ng
Dim myErrorValidato r As New BL.clsErrorVali datorDataTable
Dim myRow As BL.dsBMS.tblSet tingsDefaultsRo w
myRow = CType(e.Row, BL.dsBMS.tblSet tingsDefaultsRo w)
myRow.ClearErro rs()
myErrorValidato r.Validate_Stri ngEmpty(myRow,
Me.defaultAdmin FeePercentageCo lumn, "Cant be an empty string dude")
myErrorValidato r.Validate_Deci malBetween(myRo w,
Me.defaultAdmin FeePercentageCo lumn, 0, 1, "Enter a valid percentage value")
myErrorValidato r.Validate_Stri ngEmpty(myRow,
Me.defaultMarke tingFeePercenta geColumn, "Cant be an empty string dude")
myErrorValidato r.Validate_Deci malBetween(myRo w,
Me.defaultMarke tingFeePercenta geColumn, 0, 1, "Enter a valid percentage
value")
myErrorValidato r.Validate_Stri ngEmpty(myRow,
Me.defaultTeleF eePercentageCol umn, "Cant be an empty string dude")
myErrorValidato r.Validate_Deci malBetween(myRo w,
Me.defaultTeleF eePercentageCol umn, 0, 1, "Enter a valid percentage value")
End Sub
Thank you kindly for any ideas
John Sheppard 0 857 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Darren Wooding |
last post by:
Hello, can anyone offer any advice, this one is driving me
up the wall!
1. I am using a webform datagrid.
2. The columns are all dynamic and defined using templates
(see code below).
3. I have a nice set of buttons on the grid for edit,
update, cancel and delete.
4. I handle the events with the "Handles
dgGrid.EditCommand", "Handles dgGrid.UpdateCommand",
|
by: enki |
last post by:
I have been reading Ruminations on C++, a very interesting book. They
are going into handles. I think what they are doing is very intersting
and very confusing. I have to read each paragraph several times to
understand.
I would like to understnad hgandles and find good uses for them or
better understand how they can make my programs better.
|
by: LBT |
last post by:
I have a window service written in VB.NET to scan directory and process file.
During directory scanning (scheduled by timer using
System.IO.Directory.GetFiles method), I can observe that the column "Handles"
in "Task Manager" will increase gradually but will be dropped after a short
while.
But when CPU is busy (reach 100%), the number specified by "Handles"
increases continuously until I have to manually stop the window service or
the...
|
by: Brett |
last post by:
I'm using a third part component in a certain app. The component has
methods and events. I noticed one particular event was not firing after a
while but it should have been. The problem was the "handles" part was
missing. I didn't remove this that I know of. After putting this back in,
the event started firing.
Actually, the code inside the event wasn't firing but the "private sub
eventname()" part was being hit. By putting a...
|
by: Simon Verona |
last post by:
I have a problem in my application which I believe is due to open handles.. .
The symptom that users report is that after they have been using the application for a while, it will randomly just crash with an exception report (I've not got the details of the error, but I'm working on that now!).
I'm trying to reproduce the circumstances by simulating a typical batch of user tasks on my pc and monitoring whats happening. I'm guessing it's...
| |
by: antonyliu2002 |
last post by:
Right now I put my VB code in the aspx pages. I would prefer to use
codebehind, especially many of my VB functions may be shared across
multiple aspx pages.
I've tried a few pages with codebehind by follwing some examples on the
Web and they work just fine.
However, I am scared away from codebehind by such extenstions as
"Handles MyBase.Load", "Handles Button1.Click" and "Handles
MyBase.Init" etc. which we seem to have to add to the...
|
by: sck10 |
last post by:
Hello,
Is there an equivalent to using "Handles" in the codebehind for c#? Or do I
have to declare every event in the GridView control like the following:
<asp:GridView ID="gvSearchList" runat="server"
DataSourceID="dsSearchList"
DataKeyNames="ServiceIdea_ID"
OnSelectedIndexChanged="gvSearchList_SelectedIndexChanged">
|
by: Microsoft News Group |
last post by:
I am adding some field validation throught column changing with partial
classes. I am debugging it and when it hits
this.ColumnChanging += ValidateColumn;
It never goes to the method
void ValidateColumn(object sender, DataColumnChangeEventArgs e)
|
by: Jurgen Haan |
last post by:
Hi there.
Recently, one of our application servers is moaning about its handles.
(no more handles available).
I'm guessing it has to do with some bug in our software where it does
not release handles properly and every x thousand queries, one available
handle gets lost (unreleased).
Are handles available PER application, or is there one general pool of
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |