Refresh grid on one control when form is submitted on other control

5 posts, 0 answers
  1. tmorford
    tmorford avatar
    7 posts
    Member since:
    Jul 2007

    Posted 02 Sep 2010 Link to this post

    Hey all I have a page with a bunch of accordion panels with controls in them, what I need is when they submit a form on one control I need the radgrid on a different control to refresh how do I do this?

    thanks!
    Panels:
    <div>
                        <h3>
                            <a href="#">Create Groups</a></h3>
                        <div>
                            <asp:UpdatePanel ID="UpdatePanelCreateGroups" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <div>
                                        <oti:CreateGroup ID="CreateGroup" runat="server" />
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </div>
                    <div>
                        <h3>
                            <a href="#">Edit Questions</a></h3>
                        <div>
                            <asp:UpdatePanel ID="UpdatePanelEditQuestions" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <div>
                                        <oti:EditQuestionsGroup ID="EditQuestionsGroup" runat="server" />
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </div>
                    <div>
                        <h3>
                            <a href="#">Edit Group Questions</a></h3>
                        <div>
                            <asp:UpdatePanel ID="UpdatePanelEditGroupQuestions" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <div>
                                        <oti:EditGroup ID="EditGroup" runat="server" />
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </div>
  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 02 Sep 2010 Link to this post

    On the event of the control that submits the form call the Rebind() method of the RadGrid you want to refresh.

    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. tmorford
    tmorford avatar
    7 posts
    Member since:
    Jul 2007

    Posted 02 Sep 2010 Link to this post

    Yes thanks but how do I get get access to the radgrid on a different control?
    I have tried Page.FindControl that did not work.

    thanks!
  5. tmorford
    tmorford avatar
    7 posts
    Member since:
    Jul 2007

    Posted 02 Sep 2010 Link to this post

    RadGrid rg = ((RadGrid)((UserControl)((UpdatePanel)ButtonSaveQuestions.NamingContainer.NamingContainer.FindControl("UpdatePanelEditQuestions")).FindControl("EditQuestionsGroup")).FindControl("RadGridEditQuestions"));
                rg.Rebind();
    This sees the grid but the Rebind does not seem to work.
  6. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 03 Sep 2010 Link to this post

    Hi Tmorford,

    Could you please elaborate a bit more on your scenario. Do you have any ajax settings added on the user control or on the page? If you make an ajax request to the server from a control you need to ajaxify the RadGrid too. In that way the RadGrid will be refreshed on the client when you called the Rebind method.

    On the following online resources you could find more information about ajaxifying RadControls:
    http://www.telerik.com/help/aspnet-ajax/ajxajaxmanager.html
    http://www.telerik.com/help/aspnet-ajax/ajxusercontrols.html
    http://www.telerik.com/help/aspnet-ajax/ajxajaxmasterpage.html
    http://www.telerik.com/help/aspnet-ajax/ajxajaxpanel.html

    Greetings,
    Radoslav
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017