Good day to all
I have the following code:
The problem is that if the client does not pick from the dropdown but simply hits enter e.value of course is not what I am looking for.
So I need a way to disable enter and have the client force to pick from dropdown.
You can try it here: http://zuol.ch.mserver4.arvixevps.com/firmen/ left side
Markus
I have the following code:
telerik:RadSearchBox ID="RadSearchBox1" runat="server" Width="250px" Skin="MetroTouch" DataSourceID="OpenAccessLinqDataSource1" CssClass="" DataTextField="user_firmaname"
DataValueField="user_id" Culture="de-DE" onsearch="RadSearchBox1_Search" ShowSearchButton="False">
<
DropDownSettings
Height
=
"400"
Width
=
"670"
>
<
HeaderTemplate
>
<
ul
>
<
li
class
=
"col1"
>Firma</
li
>
<
li
class
=
"col2"
>Ort</
li
>
</
ul
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
ul
>
<
li
class
=
"col1"
>
<%# DataBinder.Eval(Container.DataItem, "user_firmaname") %></
li
>
<
li
class
=
"col2"
>
<%# DataBinder.Eval(Container.DataItem, "user_ort") %></
li
>
</
ul
>
</
ItemTemplate
>
</
DropDownSettings
>
</
telerik:RadSearchBox
>
protected
void
RadSearchBox1_Search(
object
sender, SearchBoxEventArgs e)
{
if
(e.Text !=
null
)
{
string
firmenname = e.Text;
firmenname = firmenname.Replace(
"+"
,
"und"
);
Response.Redirect(
"/firmen/"
+ e.Value +
"/"
+ firmenname);
}
else
{
RadSearchBox1.EmptyMessage =
"keine Firma gefunden"
;
}
}
The problem is that if the client does not pick from the dropdown but simply hits enter e.value of course is not what I am looking for.
So I need a way to disable enter and have the client force to pick from dropdown.
You can try it here: http://zuol.ch.mserver4.arvixevps.com/firmen/ left side
Markus