Click here to Skip to main content
15,899,314 members
Home / Discussions / C#
   

C#

 
AnswerRe: TypeInitializationException was unhandled? Pin
PIEBALDconsult18-Dec-08 16:32
mvePIEBALDconsult18-Dec-08 16:32 
QuestionN-Tier DataTable Validation... Pin
Illegal Operation18-Dec-08 12:16
Illegal Operation18-Dec-08 12:16 
I am busy with an NTier application that has a DataAccess project containing a DataSet, a DataEntities project containing the structure of the dataset, a WCF Service that handles the DataAccess calls to the DataAccess Project and a Windows Forms Project thast contains the forms.

I need to impliment validation and I have added the following to my datatable code.

public override void EndInit()
{
    base.EndInit();
    ColumnChanging += IndustryColumnChangingEvent;
}


public void IndustryColumnChangingEvent(object sender, System.Data.DataColumnChangeEventArgs e)
{
    if (e.Column.ColumnName == "Industry")
    {
        if ((string)e.ProposedValue == "")
        {
            e.Row.SetColumnError("EIndustry_Description", "Please enter a Industry.");
        }
        else
        {
            e.Row.SetColumnError("EIndustry_Description", "");
        }
    }
}


The problem is that the above mentioned method never executes if I debug and I know that I should call the moethod but I have no idea how to call the mothod in the form.

What would be the best way to call/access this method in my windows forms project?

Illegal Operation

QuestionHow to handle errors right? Pin
skyline9218-Dec-08 11:39
skyline9218-Dec-08 11:39 
AnswerRe: How to handle errors right? Pin
Christian Graus18-Dec-08 11:45
protectorChristian Graus18-Dec-08 11:45 
AnswerRe: How to handle errors right? Pin
Expert Coming18-Dec-08 11:47
Expert Coming18-Dec-08 11:47 
AnswerRe: How to handle errors right? Pin
led mike18-Dec-08 12:21
led mike18-Dec-08 12:21 
QuestionHttpWebRequest with Client certs Pin
kicknit218-Dec-08 11:15
kicknit218-Dec-08 11:15 
Questionconnecting to sqlConnection after restarting SQL server process fails Pin
calanit18-Dec-08 10:06
calanit18-Dec-08 10:06 
AnswerRe: connecting to sqlConnection after restarting SQL server process fails Pin
Dave Kreskowiak18-Dec-08 10:15
mveDave Kreskowiak18-Dec-08 10:15 
GeneralRe: connecting to sqlConnection after restarting SQL server process fails Pin
calanit18-Dec-08 10:27
calanit18-Dec-08 10:27 
QuestionRe: connecting to sqlConnection after restarting SQL server process fails Pin
led mike18-Dec-08 10:29
led mike18-Dec-08 10:29 
AnswerRe: connecting to sqlConnection after restarting SQL server process fails Pin
calanit18-Dec-08 10:40
calanit18-Dec-08 10:40 
GeneralRe: connecting to sqlConnection after restarting SQL server process fails Pin
Dave Kreskowiak18-Dec-08 10:45
mveDave Kreskowiak18-Dec-08 10:45 
GeneralRe: connecting to sqlConnection after restarting SQL server process fails Pin
calanit18-Dec-08 11:03
calanit18-Dec-08 11:03 
QuestionGet rid of label margins Pin
Tony Pottier18-Dec-08 8:23
Tony Pottier18-Dec-08 8:23 
AnswerRe: Get rid of label margins Pin
#realJSOP18-Dec-08 8:33
professional#realJSOP18-Dec-08 8:33 
AnswerRe: Get rid of label margins Pin
Dave Kreskowiak18-Dec-08 8:33
mveDave Kreskowiak18-Dec-08 8:33 
GeneralRe: Get rid of label margins Pin
Tony Pottier18-Dec-08 8:43
Tony Pottier18-Dec-08 8:43 
GeneralRe: Get rid of label margins Pin
Dave Kreskowiak18-Dec-08 9:04
mveDave Kreskowiak18-Dec-08 9:04 
GeneralRe: Get rid of label margins Pin
Tony Pottier18-Dec-08 9:06
Tony Pottier18-Dec-08 9:06 
GeneralRe: Get rid of label margins Pin
Tony Pottier18-Dec-08 9:37
Tony Pottier18-Dec-08 9:37 
GeneralRe: Get rid of label margins Pin
Tony Pottier18-Dec-08 9:58
Tony Pottier18-Dec-08 9:58 
GeneralRe: Get rid of label margins Pin
DaveyM6918-Dec-08 11:21
professionalDaveyM6918-Dec-08 11:21 
GeneralRe: Get rid of label margins Pin
Tony Pottier18-Dec-08 11:27
Tony Pottier18-Dec-08 11:27 
GeneralRe: Get rid of label margins Pin
Luc Pattyn18-Dec-08 12:50
sitebuilderLuc Pattyn18-Dec-08 12:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.