I have a asp page containing a linkbutton. When it is clicked, the server side behind code will retrieve some text from database. Then display it in a div block inside a RadWindow.
The issue was that when the RadWindow was popped up for the first time by clicking the button, ABC was displayed . When you clicked the button again, the retrieved text was displayed. Could anyone help? Thanks!
Below is the code:
The linkButton behind code:
protected void button1_Click(object sender, EventArgse) {
String text = retrieve(...);
string script = string.Format("showResult (\"{0}\");",text);
RadAjaxManager.GetCurrent(Page).ResponseScripts.Add(script);
}
js code:
var rwNoneEditable = '<%=rwNoneEditable.ClientID%>'
function showResult (text) {
$("#carInfo").html(text);
alert($("#carInfo").html());//show the text
var radW = $find('<%=rwNoneEditable.ClientID%>');
radW .show();
}
RadWindow asp:
<asp:UpdatePanel ID="upNoneEditable" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<telerik:RadWindow ID="rwNoneEditable" runat="server" Modal="true" Behaviors="Close, Move, Resize"
VisibleStatusbar="False" Width="700px" Height="600px" VisibleTitlebar="True" Title="Test" >
<ContentTemplate>
<div id="carInfo" style="overflow: scroll; width: 100%; height: 100%;" visible="true">
ABC
</div>
</ContentTemplate>
</telerik:RadWindow>
</ContentTemplate>
</asp:UpdatePanel>
The issue was that when the RadWindow was popped up for the first time by clicking the button, ABC was displayed . When you clicked the button again, the retrieved text was displayed. Could anyone help? Thanks!
Below is the code:
The linkButton behind code:
protected void button1_Click(object sender, EventArgse) {
String text = retrieve(...);
string script = string.Format("showResult (\"{0}\");",text);
RadAjaxManager.GetCurrent(Page).ResponseScripts.Add(script);
}
js code:
var rwNoneEditable = '<%=rwNoneEditable.ClientID%>'
function showResult (text) {
$("#carInfo").html(text);
alert($("#carInfo").html());//show the text
var radW = $find('<%=rwNoneEditable.ClientID%>');
radW .show();
}
RadWindow asp:
<asp:UpdatePanel ID="upNoneEditable" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<telerik:RadWindow ID="rwNoneEditable" runat="server" Modal="true" Behaviors="Close, Move, Resize"
VisibleStatusbar="False" Width="700px" Height="600px" VisibleTitlebar="True" Title="Test" >
<ContentTemplate>
<div id="carInfo" style="overflow: scroll; width: 100%; height: 100%;" visible="true">
ABC
</div>
</ContentTemplate>
</telerik:RadWindow>
</ContentTemplate>
</asp:UpdatePanel>