RadGrid on User control Refresh in RadWindow

3 posts, 1 answers
  1. newguy
    newguy avatar
    26 posts
    Member since:
    May 2013

    Posted 03 Jul 2013 Link to this post

    Hi guys,

    This is a 2 part question, i have been through some of the examples and previous questions posted and havent found my answer.

    I have a main.aspx page with a RadGrid , In the Grid i have a column with and ImageButton that Opens Edit.aspx page inside of a RadWindow. On the Edit.aspx page i have 7 UserControls that are only shown when needed, The one user control is just a summary Control and has a RadGrid on it (This is the default UserControl that Gets shown when the RadWindow is opened). Now when a different UserControl is shown the Summary UserControl Just gets hidden.

    On the UserControl now being shown it has a few Text Boxes and a Save Button which will update my database. When the user Clicks on the Save button my database is updated, the Current UserControl is hidden and my summary UserControl is being shown again. The problem i am having is that the RadGrid in the Summary UserControl Isnt being refreshed or updated. The only way i have found the RadGrid to refresh its contents it to close the RadWindow and open it again by clicking on my imageButton on the Main.aspx page.

    Is there a way to refresh the RadGrid on the Summary UserControl once a user clicks on the Save button and the Summary UserControl is being shown again. (All code snippets i have found so far have failed)

    RadWindow on the Main.aspx page

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="True">
    <telerik:RadWindow ID="IncidentListDialog" runat="server" Title="Incident" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true" Width="900px" Height="760px" Left="50px" Top="50px" >
    <telerik:RadWindow ID="IncidentActionsDialog" runat="server" Title="Actions" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true" Width="900px" Height="760px" Left="50px" Top="50px">

    On my Main.aspx page, When i Click on the ImageButton to open a New RadWinow even though i have set Top and Left positions my RadWindow Still Centers itself on my screen, and if i am scrolled to the top of the Main.aspx page and Click on a ImageButton the Radwindow will move to the Top of my page where i cannot access the RadWindows Control bar

  2. Answer
    Marin Bratanov
    Marin Bratanov avatar
    3564 posts

    Posted 04 Jul 2013 Link to this post


    On refreshing the grid - all this functionality is encapsulated in the page loaded in the RadWindow. This means if it works outside of the RadWindow, it will work inside as well. The most likely reason I find for this behavior is AJAX - if you do not update all the necessary controls you will not see an update in the grid's datasource. What I can suggest at this point is making sure it is included in the response and making sure its Rebind() method is called. You can expose the grid in a public property of its user control so you can access it from the other user control.

    On the RadWindow position - a modal RadWindow is always centered and the following article explains how to change that: http://www.telerik.com/help/aspnet-ajax/window-troubleshooting-positioning-modal-popup.html.
    The positioning issue is most likely related to default focus in the content page that causes the browser to attempt to scroll it into view, see this thread on the matter: http://www.telerik.com/community/forums/aspnet-ajax/window/radwindow-moves-by-itself-after-opening.aspx.

    Marin Bratanov
    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.
  3. DevCraft R3 2016 release webinar banner
  4. newguy
    newguy avatar
    26 posts
    Member since:
    May 2013

    Posted 05 Jul 2013 Link to this post

    Thank you marin you such a legend.

    I will post my code soon so other user can see what was done.
Back to Top