I'm trying to update the value of the control that is outside the dynamically created RadGrid. I'm using the reference - http://www.telerik.com/help/aspnet/grid/grduseajaxtoupdateoutsidecontrols.html.
I need to update the text of the Label control(lies out of the grid) when the textbox's (in the grid) text is changed.
The JS within the literal control is created but is never called. I'm using the RadAjaxManager to update the grid and the Label.
Can someone please see what the problem is and offer a solution
I need to update the text of the Label control(lies out of the grid) when the textbox's (in the grid) text is changed.
The JS within the literal control is created but is never called. I'm using the RadAjaxManager to update the grid and the Label.
Can someone please see what the problem is and offer a solution
protected
override
void
OnLoad(EventArgs e)<br> {<br> RadGrid grid = (RadGrid)pc1.FindControl(
"dgSample"
);<br> RadAjaxManager1.AjaxSettings.AddAjaxSetting(grid, grid);<br> RadAjaxManager1.AjaxSettings.AddAjaxSetting(grid, Label2);<br>
base
.OnLoad(e);<br> }
protected
void
cTextbox_TextChanged(
object
sender, EventArgs e)<br> {<br> LiteralControl ctrl1 =
new
LiteralControl<br> (String.Format(
"<script type='text/javascript'>document.getElementById('{0}').innerHTML = '{1}';</script>"
,
this
.FindControl(
"Label2"
).ClientID,
"Teexx"
));<br><br><br>
//You should add the LiteralControl to the Controls collection of RadGrid in order to make it work with Telerik RadGrid AJAX<br> this.Controls.Add(ctrl1);<br> return;<br> }