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

Ajax communication between a user control and a RadGrid

3 Answers 16 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alexandru-Anton
Top achievements
Rank 1
Alexandru-Anton asked on 26 Sep 2013, 05:30 PM
Hello,

I have a Radgrid bound to a data source:
<radG:RadGrid ID="grdOthers" runat="server" DataSourceID="odsOthers"...>
..and a user control which contains a complex popup for adding a new record to the data source
<ucAutreActivite:AutreActivite ID="PopupAutreActivite"...>
In the user control the button which does the job:
<asp:ImageButton ID="btnValiderPopupAjouterActivite"...>

I also manually set in the user control the Ajax context between the button and the parent grid (which is a property of the user control), and it seems that it appears well in the View Source code:
window["RadAjaxManagerPlanningGrid"] = new RadAjaxManager(...{InitControlID : "PopupAutreActivite_btnValiderPopupAjouterActivite",UpdatedControls : [{ControlID:"PopupAutreActivite_AjouterActivitePopup",PanelID:""},{ControlID:"grdOthers",PanelID:""}]}...)

The problem is although that, after pressing the button which inserts a new value (and this works OK), the grid is not refreshed.
Am I missing something?

Thank you

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 01 Oct 2013, 10:31 AM
Hi Alexandru-Anton,

Note that in scenarios where UserControl is used as edit form for RadGrid control the whole RadGrid should be ajaxified instead of explicitly ajaxify controls form the UserControl. See the demo below which demonstrates similar approach:
http://demos.telerik.com/aspnet-ajax-beta/grid/examples/data-editing/edit-form-types/defaultcs.aspx

I hope this helps.

Regards,
Maria Ilieva
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Alexandru-Anton
Top achievements
Rank 1
answered on 01 Oct 2013, 11:11 AM
Yes, I set Ajax between RadGrid and RadGrid and between the button and RadGrid.
Only that I use another control for the popup, in the grid that I use (from Telerik.WebControls) and a version from 2009, there is no EditMode = Popup for the grid/ MasterTableView

Thanks.
0
Maria Ilieva
Telerik team
answered on 04 Oct 2013, 10:24 AM
Hello Alexandru-Anton,

The version you are using is rather old and most of the current features and improvements int he controls is not implemented in it. therefore I would suggest you to update to the latest version of the controls and test the required features which should work properly.

Regards,
Maria Ilieva
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Alexandru-Anton
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Alexandru-Anton
Top achievements
Rank 1
Share this question
or