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

[Solved] RadAjax & UserControl

1 Answer 98 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jean-Yves
Top achievements
Rank 1
Jean-Yves asked on 26 May 2009, 09:48 PM
Hi,

I found some post of RadAjax & UserControl but I think that is not exactelly want I would like.

I have a UserControl VERY simple : 
public partial class Marge : System.Web.UI.UserControl
    {
        public string titre { get; set; }
        public string marge { get; set; }
        public string heures { get; set; }
        public string achats { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {
            TabRoundHaut1.titre = titre;
            LabelMarge.Text = marge;
            LabelHeures.Text = heures;
            LabelAchats.Text = achats;
        }
    }
So, there is just 4 label...

I put this UserControl on a page.
When I update the RadGrid1 I want to refresh my simple UserControl.

So I have this : 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel"/>
                    <telerik:AjaxUpdatedControl ControlID="UserControl1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
     </AjaxSettings>
</telerik:RadAjaxManager>

And : 
protected void RadGridAchatsManuel_ItemCreated(object sender, GridItemEventArgs e)
{
UserControl1. titre = "Toto";
}

protected void Page_Load(object sender, EventArgs e)
{
UserControl1. titre = "Tata";
}


So when I load my page the user control  display Tata in the 'titre' it is great.
But, when I create an item in the grid... the UserControl.titre display nothing !

Thank you for your help

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 28 May 2009, 06:11 AM
Hi Jean,

I am not sure if I understand your scenario completely. Would you please elaborate a bit more in the details.
Additionally, for more information about RadAjax and UserControl, review the following articles:
User Control Edit Form
UserControls
RadAjax and WebUserControls

All the best,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
Jean-Yves
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or