A question please.

Lets say I have a grid with its datasource as a dataset with three columns
in it; UserID (an auto generated ID), LastName and FirstName. Additionally,
lets say I want to restrict the user from entering two records with the same
last name and first name. I have created a constraint for LastName
FirstName in the dataset but I would like a different message than the
default message I get when the constraint is violated. Is there a way for
me to do this?

Re: Dataset constraints by David

David
Fri Jul 29 10:14:37 CDT 2005


"Woody Splawn" <NospamwoodyS@jts.bz> wrote in message
news:ekVGk9ElFHA.3148@TK2MSFTNGP09.phx.gbl...
>A question please.
>
> Lets say I have a grid with its datasource as a dataset with three columns
> in it; UserID (an auto generated ID), LastName and FirstName.
> Additionally,
> lets say I want to restrict the user from entering two records with the
> same
> last name and first name. I have created a constraint for LastName
> FirstName in the dataset but I would like a different message than the
> default message I get when the constraint is violated. Is there a way for
> me to do this?
>

try
{
//whatever
}
catch (ConstraintException ex)
{
throw new ConstraintException("whatever");
}

David





Re: Dataset constraints by Woody

Woody
Fri Jul 29 10:16:23 CDT 2005

Yes, but where? That is, where do I place a try catch statement? In what
event?

> try
> {
> //whatever
> }
> catch (ConstraintException ex)
> {
> throw new ConstraintException("whatever");
> }
>
> David
>
>
>
>