This is a migrated thread and some comments may be shown as answers.

updating a radgrid which is in a usercontrol

1 Answer 30 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Nazım
Top achievements
Rank 1
Iron
Nazım asked on 20 Jul 2012, 02:08 PM
Hi,
I cant manage to update a radgrid which is in a usercontrol. My ajaxmanager is in the mainform.

my usercontol is TaniUC 
I manage to fire ajaxrequest event from usercontol. But i can not update radgrid. I use TaniEkle(ID) which is a public func in my usercontol,add a row to my radgrid.
It is adding but not updating on screen.


protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            if(e.Argument=="taniekle")
            {
                int ID = DataReader.GetInt32(Request.Form["grdTanilarDClickedRowIndex"]);
                if (ID > 0)
                 {
                     ucpTani.TaniEkle(ID);
                 }
                return;
            }
}



<telerik:RadAjaxManager ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
       runat="server">
       <AjaxSettings>               
        
 
           <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
               <UpdatedControls>
                  <telerik:AjaxUpdatedControl ControlID="grdHastalar" LoadingPanelID="RadAjaxLoadingPanel1" />
               </UpdatedControls>
           </telerik:AjaxSetting>
          <telerik:AjaxSetting AjaxControlID="grdHastalar" EventName="OnRowClick" >
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="TaniUC"  LoadingPanelID="RadAjaxLoadingPanel1" />
               </UpdatedControls>
           </AjaxSettings>
   </telerik:RadAjaxManager>

1 Answer, 1 is accepted

Sort by
0
Nazım
Top achievements
Rank 1
Iron
answered on 21 Jul 2012, 11:54 AM
I found the answer. I wrote the Id of usercontrol is wrong. Adding it to updatecontrol solve my questions. 

<telerik:AjaxUpdatedControl ControlID="ucpTani"  LoadingPanelID="RadAjaxLoadingPanel1" />

Tags
Ajax
Asked by
Nazım
Top achievements
Rank 1
Iron
Answers by
Nazım
Top achievements
Rank 1
Iron
Share this question
or