Tuesday, December 21, 2010

How to handle TextBox event through AJAX Manager Proxy(RadControl)

To handle the OnClick event of a asp:button, we can easily configure the AJAX Manager Proxy control by setting AjaxControlID property to the ID of the asp:button.
But to handle an event fired from a asp:textbox we need to set an additional property named EventName. We have to set the proper textbox event in order to handle it by AJAX Manager Proxy



Sample
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
 <AjaxSettings>
  <telerik:AjaxSetting AjaxControlID="Button1">
   <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="DetailsView1" />
    <telerik:AjaxUpdatedControl ControlID="GridView1" />
   </UpdatedControls>
  </telerik:AjaxSetting>


  <telerik:AjaxSetting AjaxControlID="TextBox1" EventName="OnTextChanged">
   <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="GridView1" />
    <telerik:AjaxUpdatedControl ControlID="DetailsView1" />
   </UpdatedControls>
  </telerik:AjaxSetting>
 </AjaxSettings>
</telerik:RadAjaxManagerProxy>

No comments: