Subject | "Default" Value for a Field |
---|---|
Author | Daniel Albuschat |
Post date | 2004-07-13T12:50:22Z |
Hello,
I want to set the value of a column in my
IBO_Query to a default value after I've inserted
a new datarow (before posting it, that is).
I want this effect:
The user presses the "+" in the IBO_UpdateBar,
a new datarow appears, and some of the fields
already have values filled in to guide the user.
I've done this in the AfterInsert event, via
FieldByName. But this method has the drawback
that IBO thinks the user has modified the dataset,
and it's out of plain "insert" mode. That is, if
you change the row in the grid, the dataset gets
posted instead of discarded (if you insert a
dataset in a `normal' grid, for example if you
press the "down" button when you're at the end
of the grid, and press the "up" button again,
the new datarow is discarded. But the dataset
is posted instead if I change a field with
FieldByName in the AfterInsert event).
Is there another way to do this without the drawback
mentioned above?
Thanks,
Daniel Albuschat
--
eat(this); // delicious suicide
I want to set the value of a column in my
IBO_Query to a default value after I've inserted
a new datarow (before posting it, that is).
I want this effect:
The user presses the "+" in the IBO_UpdateBar,
a new datarow appears, and some of the fields
already have values filled in to guide the user.
I've done this in the AfterInsert event, via
FieldByName. But this method has the drawback
that IBO thinks the user has modified the dataset,
and it's out of plain "insert" mode. That is, if
you change the row in the grid, the dataset gets
posted instead of discarded (if you insert a
dataset in a `normal' grid, for example if you
press the "down" button when you're at the end
of the grid, and press the "up" button again,
the new datarow is discarded. But the dataset
is posted instead if I change a field with
FieldByName in the AfterInsert event).
Is there another way to do this without the drawback
mentioned above?
Thanks,
Daniel Albuschat
--
eat(this); // delicious suicide