H
Harry
Hi,
I have a problem with the default Item of an asp:dropdownlist.
I databind the dropdown list in the code with values from a SQL
Database as per below.
ViewOptions.RowFilter = "Code LIKE 'MM%'";
ddlRam.DataSource = ViewOptions;
ddlRam.DataTextField = "Name";
ddlRam.DataValueField = "IncPrice";
ddlRam.DataBind();
But what I would like now, is for the default option to be set to a
different value based on the below filter:
ViewOptions.RowFilter = "PrRange LIKE 'S' AND Code Like 'MM%'";
Can anyone tell me if this is actually possible.
(Ideally something like the below line would be perfect, if it
worked!!)
ddlRam.SelectedItem = ViewOptions.RowFilter = "PrRange LIKE 'S' AND
Code Like 'MM%'";
ANy help appriciated as always.
Thanks
H
I have a problem with the default Item of an asp:dropdownlist.
I databind the dropdown list in the code with values from a SQL
Database as per below.
ViewOptions.RowFilter = "Code LIKE 'MM%'";
ddlRam.DataSource = ViewOptions;
ddlRam.DataTextField = "Name";
ddlRam.DataValueField = "IncPrice";
ddlRam.DataBind();
But what I would like now, is for the default option to be set to a
different value based on the below filter:
ViewOptions.RowFilter = "PrRange LIKE 'S' AND Code Like 'MM%'";
Can anyone tell me if this is actually possible.
(Ideally something like the below line would be perfect, if it
worked!!)
ddlRam.SelectedItem = ViewOptions.RowFilter = "PrRange LIKE 'S' AND
Code Like 'MM%'";
ANy help appriciated as always.
Thanks
H