Hi,
I'm very new to Telerik controls. Today I tried to get RadAjaxPanel to postback part of the page but cound't get it to do so. Can anyone please indicate what I am doing wrong. For the sake of simplicity I've added some text to the top of the page so as to make the page refresh more visible.
Below is the code using controls that come with .NET
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
What follows is the Telerik equivalent that isn't working.
I'm very new to Telerik controls. Today I tried to get RadAjaxPanel to postback part of the page but cound't get it to do so. Can anyone please indicate what I am doing wrong. For the sake of simplicity I've added some text to the top of the page so as to make the page refresh more visible.
Below is the code using controls that come with .NET
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
id
=
"Head1"
runat
=
"server"
>
<
script
runat
=
"server"
>
protected void ReadOnly_SelectedIndexChanged(object sender, EventArgs e)
{
if (ReadOnly.SelectedItem.Value == "Yes")
Details.ReadOnly = false;
else
{
Details.Text = "";
Details.ReadOnly = true;
}
}
</
script
>
<
title
></
title
>
</
head
>
<
body
>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<
form
id
=
"Form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
>
</
asp:ScriptManager
>
<
asp:UpdatePanel
ID
=
"UpdatePanel1"
runat
=
"server"
>
<
ContentTemplate
>
Read Only:
<
asp:DropDownList
ID
=
"ReadOnly"
runat
=
"server"
OnSelectedIndexChanged
=
"ReadOnly_SelectedIndexChanged"
AutoPostBack
=
"True"
>
<
asp:ListItem
Selected
=
"True"
>No</
asp:ListItem
>
<
asp:ListItem
>Yes</
asp:ListItem
>
</
asp:DropDownList
>
<
br
/>
<
br
/>
Details:
<
asp:TextBox
ID
=
"Details"
runat
=
"server"
Columns
=
"60"
Rows
=
"5"
TextMode
=
"MultiLine"
ReadOnly
=
"True"
></
asp:TextBox
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
</
form
>
</
body
>
</
html
>
What follows is the Telerik equivalent that isn't working.
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
id
=
"Head1"
runat
=
"server"
>
<
script
runat
=
"server"
>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
RadAjaxPanel2.EnableAJAX = false;
}
}
protected void ReadOnly_SelectedIndexChanged(object sender, EventArgs e)
{
if (ReadOnly.SelectedItem.Value == "Yes")
Details.ReadOnly = false;
else
{
Details.Text = "";
Details.ReadOnly = true;
}
}
</
script
>
<
title
></
title
>
</
head
>
<
body
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
p
> </
p
>
<
form
id
=
"Form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
/>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel2"
runat
=
"server"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
>
Read Only:
<
asp:DropDownList
ID
=
"ReadOnly"
runat
=
"server"
OnSelectedIndexChanged
=
"ReadOnly_SelectedIndexChanged"
AutoPostBack
=
"True"
>
<
asp:ListItem
Selected
=
"True"
>No</
asp:ListItem
>
<
asp:ListItem
>Yes</
asp:ListItem
>
</
asp:DropDownList
>
<
br
/>
<
br
/>
Details:
<
asp:TextBox
ID
=
"Details"
runat
=
"server"
Columns
=
"60"
Rows
=
"5"
TextMode
=
"MultiLine"
ReadOnly
=
"True"
></
asp:TextBox
>
</
telerik:RadAjaxPanel
>
</
form
>
</
body
>
</
html
>