Opening RadWindow on click of the Grid Button Column

6 posts, 0 answers
  1. saravanan k
    saravanan k avatar
    88 posts
    Member since:
    Mar 2010

    Posted 21 May 2010 Link to this post

    Hi all,

          I am having a radgrid with a grid button column meant for playing an audio file. I gave the command name as "Play" and in the grid_itemcommand event handler i tried to open a radwindow having the media player from code behind. But since my grid is configured with rad ajax manager and rad ajax loading panel to make ajax postbacks i am not getting the radwindow. When i removed the radajax manger and loading panel the window appears as expected.

     But i dont want the page to get reloaded for even for a sort operation. Is there anything similar to the triggers of update panel for loading panel or any other ways please suggest.

    Regards,
    Saravanan K
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 21 May 2010 Link to this post

    Hi Saravanan,

    Please refer to the online example below which demonstrates a similar functionality. Give it a try and let me know if it helps to achieve your goal:
    http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window

    Regards,
    Pavlina
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. saravanan k
    saravanan k avatar
    88 posts
    Member since:
    Mar 2010

    Posted 24 May 2010 Link to this post

    Hi Pavlina,
                  
                     Thanks for the reply. But that demo is based on opening the window from javascript. But in my case i want to set some session variables and do some server side logic before opening the window. So I would prefer opening the window from the code behind. I am having the following code in itemCommand event handler.

    else if (e.CommandName == "Play")  
                {  
                    GridDataItem row = e.Item as GridDataItem;  
                    string text = row["colPreview"].Text;  
     
                    //asssign to session variable   
                    Session["text"] = text;  
     
                    TelerikNew.RadWindow window = new TelerikNew.RadWindow();  
                    window.ID = "Player";  
                    window.NavigateUrl = "Player.aspx";  
                    window.Visible = true;  
                    window.VisibleOnPageLoad = true;  
                    window.Title = "Player";  
                    window.Height = System.Web.UI.WebControls.Unit.Pixel(180);  
                    window.Width = System.Web.UI.WebControls.Unit.Pixel(200);  
                    window.Skin = "Office2007";  
                    window.VisibleTitlebar = true;  
                    window.Behaviors = Telerik.Web.UI.WindowBehaviors.Close;  
                    window.ShowContentDuringLoad = false;  
                    window.Modal = true;  
                    WindowManager.Windows.Add(window);  
                } 

    and inside the Player.aspx.cs i am reading the text and displaying it over there. I cannot use QueryString for the same since the max length of the string can exceed 4000 characters.

    But the problem i told in the post 1 still persists. Please help

    Regards,
    Saravanan K
  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 27 May 2010 Link to this post

    Hello Saravanan,

    You can open the RadWindow from the server by setting its VisibleOnPageLoad property to true. More information on the subject is available here:
    Setting Server-Side Properties

    Best wishes,
    Pavlina
    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.
  6. Nagendra
    Nagendra avatar
    1 posts
    Member since:
    Sep 2016

    Posted 25 Oct in reply to Pavlina Link to this post

    hi

    i have  rad grid,in this grid i have one button,click on button popup the radwindow& after pop up window the grid will be load in radwindow is not working.can any help

     protected void Radbutton1_click(object sender, EventArgs e)
            {



                string script = "function f(){$find(\"" + RadWindow1.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);
               
                rgdepartment.DataSource = LoadDepartmentMaster();
                rgdepartment.DataBind();
                rgdepartment.Visible = true;
            }

    my data table is coming to datasource but it is not bind & not display on rad popup window,any help

     

  7. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 28 Oct Link to this post

    Hi Nagendra,

    Could you open a support ticket and send us a sample project where the problem with grid in popup window can be observed? Thus we will be able to debug it locally and provide a solution.

    Regards,
    Pavlina
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017