RadWindow closes, now update/refresh radGrid on parent page

36 posts, 1 answers
  1. Spiros
    Spiros avatar
    15 posts
    Member since:
    May 2010

    Posted 12 Jun 2014 Link to this post

    Hi Guys.
    I am updating the grid before the RadWindow close.

                function Close() {
                    
                    debugger
                    var id = document.getElementById("<%= hdnCoverId.ClientID %>").value;
                    var selection = document.getElementById("<%= cmbApallagi.ClientID %>").value;

                    //alert(id);
                    var grid = $find("<%=grdCovers.ClientID %>");
                    var MasterTable = grid.get_masterTableView();
                    var items = MasterTable.get_dataItems();

                    // get the # of rows
                    var length = MasterTable.get_dataItems().length;

                    for (var i = 0; i < length; i++) {
                        // get the record
                        var record = MasterTable.get_dataItems()[i];
                        var keyValue = record.getDataKeyValue("Id")
                        var lbNom = record.findElement("lblNominal");      //access the Label

                        if (keyValue == id && selection == 2) {
                            //console.log(keyValue);
                            lbNom.innerText = "1";                             // assigning value to label control
                        }
                        else
                        {
                            lbNom.innerText = "0";                             // assigning value to label control
                        }

                    }

                    // and rebind it to the changed data
                    MasterTable.updateEditedItems();

                    var oWindowCust = $find('<%= RadWindow2.ClientID %>');
                    oWindowCust.Close();

                }

    Everything works fine but the rest of the controls does not work. I mean not a single event is raised.
    Any idea ?
    Thanks in advance.
    Spiros
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 13 Jun 2014 Link to this post

    Hello Spiros,

    From the way you reference the controls, it seems they are all on the same page, so the RadWindow's ContentTemplate is used. If this is not the case you would need to access the parent page's grid properly.

    The most likely reason for lose of interactivity on the page is a JavaScript error, so I advise that you examine the browser console and debug the scripts to see if/what error is raised in order to fix it.


    Regards,

    Marin Bratanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Asutosh
    Asutosh avatar
    130 posts
    Member since:
    Sep 2013

    Posted 10 Jul 2014 in reply to Svetlina Anati Link to this post

    hi 
    i have rad grid in my rad window
    it has maximize functionality in rad window 
    so when i maximize that my grid popup of filter is not open 
    also i have dropdown is in rad window so when i maximize radwindo my dropdown is also not open 
    i have attached error image 
    i have marked error in images

  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 10 Jul 2014 Link to this post

    Hello Asutosh,

    Based on this information, it seems you are using your RadWindow(s) with their ContentTemplate. In this case all their content is on the same page and z-index rules apply to it: http://www.telerik.com/help/aspnet-ajax/controlling-absolute-positioning-with-zindex.html. A maximized RadWindow gets a very large z-index value, so other absolutely positioned elements like dropdowns would remain behind it.

    To avoid this, simply set its ShowOnTopWhenMaximized property to false (it defaults to true).


    Regards,

    Marin Bratanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Melvin
    Melvin avatar
    14 posts
    Member since:
    Apr 2015

    Posted 14 Apr 2015 Link to this post

    I need to update the radWindow control from a button that is located internally in the radwindow.

    The scenario I have is as follows:
    Since a main form I call radwindow and it displays me another form, which contains a textbox and a radgrid. When I digit something in the textbox and press down on the button to add, I need to reload the radwindow like the effect of having the radwindow.

    As I do this?

    sorry for my english, is not very good xD!! 

    Thank you for your help.

  7. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 16 Apr 2015 Link to this post

    Hi Melvin,

    I suggest keeping your query in the separate thread you have opened: http://www.telerik.com/forums/how-to-refresh-radwindow.

    I would advise that you keep threads concise in the future by posting in relevant threads or opening new ones, instead of branching the main question with another one.

    Regards,

    Marin Bratanov
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017