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
Indeed it should. My apologies for that mix-up.
It should be
e.Layout.Bands[0].Columns.FromKey(
"ID").Hidden = true;
This is showing folloeing error
Cannot apply indexing with [] to an expression of type 'method group'
This isn't a familiar exception. What's the line of code that causes the error, and what's the full error message?
Thanks for your reply. But It doesnt work for me. It showing me error message whic is "Cannot apply indexing to an expression of type ???"