Carl wrote:
> Hi,
>
> Ok it makes sense. The only reason I try this, is to display let say "Open"
> in the control when the value is 0 in the table, and "Close" when it is 1.
>
> I know I can use the binding parse and format, but this will add another
> issue when we edit the value, I need to see all textual choice in the combo
> for all possible value.
>
> But when I do select another value in combo 1, when binding is in effect,and
> go to another field, combo 1 will always return to original value.
Let's say dataset Foo has table "Bar" which has a column "Action".
If I bind bar to a grid:
myGrid.DataSource = Foo.Tables["Bar"];
then I'll see this table in the grid. If I then want to have a combo
box reflecting teh value of
Foo.Tables["Bar"].Rows[currentrow]["Action"], I'll do:
cmbFLSOURCE.DataSource = Foo.Tables["Bar"]
cmbFLSOURCE.DataMember = "Action";
(If I'm not mistaken).
then, traversing the grid's rows, will reflect the action column's
values in the combobox cmbFLSOURCE.
Frans
--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET:
http://www.llblgen.com
My .NET blog:
http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------