Hi All
I am binding my webcombo to list of my objects. My object has two field ID and Name. I want to display only name in combo and want to set ID as a value. Here is my sample code
sprayBoothWebCombo.DataSource = data;
sprayBoothWebCombo.DataBind();
sprayBoothWebCombo.DataTextField =
"Name";
sprayBoothWebCombo.DataValueField =
"ID" ;
But my combo is displaying Name and ID both.
Please see if anyone there can help me out..
Thanks
In the InitializeLayout event handler of yoru WebCombo, you can hide any columns that you don't want to have displayed to the user. For example:
e.Layout.Bands[0].Columns.FromKey["ID"].Hidden = true;