You will need to manually loop the items collection looking for the item you
seek. This is nearly exactly what the FindByText does.
for( int i = 0 ; i < dllSP.Items.Count ; i++ ) {
if ( ddlSP.Items[i].Text.StartsWith( "xyz" ) ) {
dllSP.SelectedIndex = i;
break;
}
}
bill
"JIM.H." <JI**@discussions.microsoft.com> wrote in message
news:69**********************************@microsof t.com...
Hello,
I usee this to find string sD in drop down list and select the value.
dllSP.SelectedIndex = dllSP.Items.IndexOf(dllSP.Items.FindByText(sD);
Can I get FindByText work with wildcards? So dropdown list has xyzt, and
if sD is xyz, I need to select xyzt. Right now it does not select since is
expects whole match. How can I do this?
Thanks,
Jim.