473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem with ColumnChanging in the BeginInit()

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)

Any ideas why? Code is below!

Public partial class Bassco

{

public partial class bcr_price_rangesDataTable

{

public override void BeginInit()

{

this.ColumnChanging += ValidateColumn;

}

void ValidateColumn(object sender, DataColumnChangeEventArgs e)

{

if (e.Column.Equals(this.MinColumn))

{

if((decimal)(e.ProposedValue) 5)

{

throw new ArgumentException("Min cannot be less than zero", "MIN");

}

}

}

}

}
Sep 21 '06 #1
0 1180

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Raul Cortes | last post by:
Hi. I am using a windowsform datagrid to modify a table. The DataSet seems to be filled fined. The DataTable seems to be ok. I am not using 'read only' anywhere. The DataSource seems to be...
0
by: Chris Ericoli | last post by:
Hi, I am working with an 'in session' ado dataset with an asp.net application. My dataset is comprised of two tables, one of which maintains a few calculated datacolumns. For some reason these...
2
by: Rob | last post by:
I currently use the datatable.ColumnChanging event to call my data validation method in a bound datagrid (Windows not Web). This is causing me problems since the user must click away from the...
3
by: Geraldine Hobley | last post by:
Hello, In my project I am inheriting several forms. However when I inherit from a form and add additional subroutines and methods to my inherited form I get all sorts of problems. e.g. I sometimes...
1
by: Ravi | last post by:
Hi All, i would like to know what is the use of DataSet.BeginInit function. Thanks in Advance. Thanks -- ravib
7
by: Vlado Jasovic | last post by:
Hello, I'm using typed dataset for databinding to windows controls and I'm having some problems. I'm trying to move all business logic to datatable column_changing events and the problem that...
0
by: Gwl | last post by:
I have a DataGridView and following code: private void button1_Click(object sender, EventArgs e) { dataGridView1.ColumnCount = 365; } When I click on the button it is extremely slow (some...
3
by: =?Utf-8?B?UnVkeQ==?= | last post by:
Hello All! I may have posted this problem before, but it was awhile ago. I'm working in VS 2003. I have 10 file watch process going. It seems that I can only about 6or 7 to run at the same...
3
by: Gerrit | last post by:
Hi, I try to learn programming in c# with databinding controls. Now I have a problem with a ComboBox with the advanced properties for databinding, I want to set the DataSourceUpdateMode to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.