radwindow open on same page of radgrid postback happen

6 posts, 0 answers
  1. sanjayanthan
    sanjayanthan avatar
    14 posts
    Member since:
    Feb 2008

    Posted 17 Sep 2012 Link to this post

    I am using radgrid which list out data's. when clicking radgrid i will open one radwindow separately which contains the information of the selected row.
    when any postback occurs like selecting second page or filter by column , page inside the radwindow opens in the radgrid page.
    here Radgrid page missing....

    Refer Screenshots for reference
  2. Eyup
    Admin
    Eyup avatar
    3862 posts

    Posted 19 Sep 2012 Link to this post

    Hi Sanjayanthan,

    Please check out the following demos and try to distinguish the crucial differences between them and your project:
    Window / Use as controls container
    Window / Edit Dialog for RadGrid

    I hope this will prove helpful.

    Regards,
    Eyup
    the Telerik team
    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 their blog feed now.
  3. sanjayanthan
    sanjayanthan avatar
    14 posts
    Member since:
    Feb 2008

    Posted 20 Sep 2012 Link to this post

    Hi,

    Thanks for your reply. I gone through the url specified by you
    Window / Use as controls container
    it is exactly what i am looking for . but the small changes is during Page load, rad window will not be open. Eventhough i changed properties. it is not working for my code.

    Check with the below url
    http://demos.telerik.com/aspnet-ajax/window/examples/usingurlforserverarguments/defaultcs.aspx
    my page will be similar to that only, additional to this i will have paging is true and also filter also available.
    but when i filtered / try for second page, when rad window open, page inside rad window open in grid contains page. rad window disappers

    <script>
       function RowClick(sender, args)
            {
                var hdnIsBulkApproval = document.getElementById('isBulkApproval');
                var option = args.getDataKeyValue("RADWINDOW_OPTION");
                if(option !='Y')
                {
                    if(hdnIsBulkApproval.value = 'N')
                    setTimeout('__doPostBack(\'' + document.forms[0] + '\' ,\'\')', 0);
                }
                else
                {
                    if(hdnIsBulkApproval.value = 'N')
                    {
                        var oArea = document.getElementById("backTest");
                        oArea.value = args.getDataKeyValue("RedirectURL1");
                        window.setTimeout("ShowokCancelWindow('" + args.getDataKeyValue("RedirectURL1") + "')", 500);
                          
                    }
                }
                 
                alert('Hi R')
            }
     
            function ChangeBulkApproval()
            {
                //document.getElementById('btnAction1').disabled = true;
                //document.getElementById('btnAction2').disabled = true;
                var hdnIsBulkApproval = document.getElementById('isBulkApproval');
                hdnIsBulkApproval.value = 'Y';
                return true;
            }
     
            function ShowokCancelWindow(url)
            {
                try
                {
                    var oWnd = $find("<%= RadWindow1.ClientID %>");
                    oWnd.show();
                    oWnd.setSize(750, 440);
                    oWnd.setUrl(url);
                    oWnd.minimize();
                    oWnd.maximize();
                    oWnd.restore();
                        //var oWnd = window.radopen(url, "ShowokCancelWindow");
                        //oWnd.setSize(750, 440);
                        //oWnd.center();                                           
                    return false;   
                }
                catch(mErr)
                {
                    alert(mErr);
                }
                 
            }
     
    </script>
     
     
     
       <cc1:LocalizedRadGrid ID="grdView" runat="server" OnItemDataBound="grdView_ItemDataBound"
                                        OnNeedDataSource="grdView_NeedDataSource" Colon="False" AutoGenerateColumns="True"
                                        OnSelectedIndexChanged="grdView_SelectedIndexChanged" OnColumnCreated="grdView_ColumnCreated"
                                        AllowPaging="true" PageSize="15" AllowMultiRowSelection="true">
                                        <MasterTableView DataKeyNames="FORMCODE,FLOWID,RAISEDFOR,LEVELNO,SEQNO,ADHOC_SEQNO,RedirectURL1,RADWINDOW_OPTION"
                                            ClientDataKeyNames="RedirectURL1,RADWINDOW_OPTION">
                                            <HeaderStyle HorizontalAlign="Left" Wrap="false" />
                                            <FilterItemStyle Wrap="false" />
                                            <Columns>
                                                <radg:GridClientSelectColumn UniqueName="chkAll" />
                                                <radg:GridBoundColumn UniqueName="RedirectURL" Visible="False">
                                                </radg:GridBoundColumn>
                                            </Columns>
                                        </MasterTableView>
                                        <ClientSettings >
                                            <ClientEvents OnRowClick="RowClick"></ClientEvents>
                                            <Selecting AllowRowSelect="True"></Selecting>
                                          
                                          
                </ClientSettings>
                                        <PagerStyle Mode="NumericPages" />
                                    </cc1:LocalizedRadGrid></div>
     
     
     
     <radg:RadWindow ID="RadWindow1" runat="server" Title="Dynamic Approval Form" Width="750"
                Height="536" VisibleOnPageLoad="false" Behaviors="Minimize, Move, Resize, Maximize" Left="580" Top="-8" EnableShadow="true"
                OffsetElementID="grdView" >
                </radg:RadWindow>
  4. Eyup
    Admin
    Eyup avatar
    3862 posts

    Posted 24 Sep 2012 Link to this post

    Hello Sanjayanthan,

    Please note that RadWindow will close upon performing a PostBack. This is the default and expected behavior. You will need to set the following property in order to preserve its appearance: VisibleOnPageLoad="true".

    In your case you could use a HiddenField to control the display of the window. I have created a sample RadGrid web site to demonstrate the suggested approach. Please check out the attached application and try to implement it within your own project.

    Kind regards,
    Eyup
    the Telerik team
    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 their blog feed now.
  5. Prashant
    Prashant avatar
    2 posts
    Member since:
    Jul 2015

    Posted 09 Oct 2015 in reply to Eyup Link to this post

    hello Eyup

    i also have same issue... n it is not solved yet..

    i have only one grid.... i have used commandItemSetting  for adding new record..

    after clicking on add new record button it open a one editing form in radwindow...\

    but this happens only on first page.... when i jumped on second page and on that second page

    if i clicked on add new record button then form is not opening in radwindow instead of this it is opening in grid....so i want to open that in radwindow...

    so please help me..

     

    thanks in advance

  6. Eyup
    Admin
    Eyup avatar
    3862 posts

    Posted 14 Oct 2015 Link to this post

    Hi Prashant,

    Are you implementing something similar to this live sample?
    http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window

    Regards,
    Eyup
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top