I am having issues with the back button when using the combo box.
In Chome when I select item one, click off the combo box, then select item one and two, click off the combo box and then hit the browser back button, it shows one in the text but one and two checked.
In IE, with the same steps, it shows one is checked but one and two as the selected text.
How would you suggest having the back button return the combo box return to the previous state where the checked items and selected text match - either in the example or with an update panel?
Thanks in advance for any help.
Here is the code:
In Chome when I select item one, click off the combo box, then select item one and two, click off the combo box and then hit the browser back button, it shows one in the text but one and two checked.
In IE, with the same steps, it shows one is checked but one and two as the selected text.
How would you suggest having the back button return the combo box return to the previous state where the checked items and selected text match - either in the example or with an update panel?
Thanks in advance for any help.
Here is the code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="del.aspx.cs" Inherits="del" %>
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager"
runat
=
"server"
></
telerik:RadScriptManager
>
<
div
>
<
telerik:RadComboBox
ID
=
"ddlCounty"
runat
=
"server"
DataSourceID
=
"LDS"
OnSelectedIndexChanged
=
"ddlCounty_SelectedIndexChanged"
DataTextField
=
"name"
DataValueField
=
"value"
CheckBoxes
=
"true"
AutoPostBack
=
"true"
EnableViewState
=
"true"
></
telerik:RadComboBox
>
<
asp:LinkButton
ID
=
"LinkButton1"
runat
=
"server"
OnClick
=
"LinkButton1_Click"
>LinkButton</
asp:LinkButton
><
asp:Label
ID
=
"Label1"
runat
=
"server"
Text
=
"Label"
></
asp:Label
>
</
div
>
<
asp:linqdatasource
runat
=
"server"
id
=
"LDS"
OnSelecting
=
"Selecting_LDS"
OnSelected
=
"OnSelecting_LDS"
></
asp:linqdatasource
>
</
form
>
</
body
>
</
html
>
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
System.Threading;
using
System.IO;
public
partial
class
del : System.Web.UI.Page
{
protected
void
Page_Load(
object
sender, EventArgs e)
{
}
protected
void
LinkButton1_Click(
object
sender, EventArgs e)
{
}
protected
void
Selecting_LDS(
object
sender, LinqDataSourceSelectEventArgs e)
{
var l =
new
List<Object>()
{
new
{value = 1, name =
"one"
},
new
{value = 2, name =
"two"
},
new
{value=3, name =
"three"
}
};
e.Result = l;
}
protected
void
ddlCounty_SelectedIndexChanged(
object
sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
{
string
[] result = (from i
in
ddlCounty.CheckedItems
select i.Value).ToArray<
string
>();
Label1.Text =
string
.Join(
"-"
, result);
}
protected
void
OnSelecting_LDS(
object
sender, LinqDataSourceStatusEventArgs e)
{
}
}