Integration WebCombo - display DataValueField instead DataTextField

1 reply. Last post: September 11, 2009 3:19 AM by Michael Giger
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

Hi

I want integrate Combo in Grid programmatically.

I bound the Webgrid and the Webcombo to Dataset and integrate Combo as follows (on PrepareDataBinding Event):

WebGridColumn UnitID = grd.RootTable.Columns[2];
UnitID.Caption = "Unit";
UnitID.Width = Unit.Pixel(200);
UnitID.EditType = EditType.WebComboNET;
UnitID.WebComboID = "wcUnit";
UnitID.ValueList.DataMember = "Measuring.Unit";
UnitID.ValueList.DataTextField = "Name";
UnitID.ValueList.DataValueField = "ID";

After selecting an item in the combo, I see their name (DataTextField) -> see attached picure ColumnBeforeInsert.jpg

After inserting, I see the ID (DataValueField) in this columns -> see attached picure ColumnAfterInsert.jpg

Why?

Regards

Michael

All times are GMT -5. The time now is 10:34 AM.
Previous Next