z-order with RadGrid and RadWindow

12 posts, 1 answers
  1. Alex
    Alex avatar
    38 posts
    Member since:
    Nov 2008

    Posted 29 Dec 2008 Link to this post

    Hi,

    I have RadGrid and Edit Mode is popup. In Edit Popup, I have a button. This button call the RadWindow dialog.

    My problem is that my dialog is only showing under RadGrid Edit Popup eventhough I set the Modal = "true" in RadWindow.

    Is there a way to set the z-order?

    I know that 

    EditMode

    ="EditForms" is working but I have 100 of pages are using EditMode="PopUp".

     

     

     

     

     



    Thanks,
    Alex
  2. Answer
    Kevin Babcock
    Kevin Babcock avatar
    189 posts
    Member since:
    Mar 2007

    Posted 30 Dec 2008 Link to this post

    Hello Alex,

    By default, the z-index of the RadWindow is set to 3000, while the z-index of the RadGrid's popup edit form is set to 3500. If you'd like to see the RadWindow over the popup form, you can edit the form's z-index by settings the server property RadGrid.MasterTableView.EditFormSettings.PopUpSettings.ZIndex to a value below 3000. Here's a quick snippet...

    <telerik:RadGrid ID="RadGrid1" runat="server" 
                AutoGenerateEditColumn="true" 
                DataSourceID="LinqDataSource1"
                <MasterTableView EditMode="PopUp"
                    <EditFormSettings EditFormType="Template"
                        <PopUpSettings ZIndex="2999" /> 

    I hope that helps. If you have further questions, please let me know.

    Regards,
    Kevin Babcock
  3. Alex
    Alex avatar
    38 posts
    Member since:
    Nov 2008

    Posted 30 Dec 2008 Link to this post

    Thanks. This is exactly what I want. I put it as follow and working fine.

    <

    EditFormSettings PopUpSettings-ZIndex="2999"></EditFormSettings>

     

  4. Dan Pitton
    Dan Pitton avatar
    2 posts
    Member since:
    Aug 2007

    Posted 01 May 2009 Link to this post

    Thanks. Those numbers helped, figured my solution.
  5. Balakrishna Reddy
    Balakrishna Reddy avatar
    37 posts
    Member since:
    Oct 2012

    Posted 15 Jan 2013 Link to this post

    Hello,
           I am new to this,i have RadGrid and EditFormType="Template"..I want to display the RadWindow dialog PopUp when i am clicking on the AddNewRecord.. So please  help how to do This......Please....

    Thanks in Advance.
  6. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Jan 2013 Link to this post

    Hi,

    You can customize the FormTemplate as shown below.
    aspx:
    <EditFormSettings EditFormType="Template">
           <FormTemplate>
         <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true"></telerik:RadWindow>
            </FormTemplate>
     </EditFormSettings>

    Thanks,
    Shinu
  7. Balakrishna Reddy
    Balakrishna Reddy avatar
    37 posts
    Member since:
    Oct 2012

    Posted 16 Jan 2013 Link to this post

    <EditFormSettings EditFormType="Template" PopUpSettings-Width="40%" InsertCaption="Add New product Paper details">
                                    <EditColumn ButtonType="ImageButton">
                                    </EditColumn>
                                    <FormTemplate>
                                        <telerik:RadWindow ID="RadWindow1" runat="server" Modal="true">
                                            <ContentTemplate>
                                                ProductName:
                                                <asp:DropDownList ID="cboProduct" runat="server" Width="30%">
                                                </asp:DropDownList>
                                                <div class="listNav">
                                                    ProductType:
                                                    <telerik:RadListBox ID="lstProductType" runat="server" CheckBoxes="true" DataTextField="ProductType">
                                                    </telerik:RadListBox>
                                                    PaperType:
                                                    <telerik:RadListBox ID="lstPaperType" runat="server" CheckBoxes="true" DataTextField="PaperType">
                                                    </telerik:RadListBox>
                                                    <br />
                                                    IsActive:
                                                    <asp:CheckBox ID="IsActive" runat="server" />
                                                </div>
                                                <br />
                                                <telerik:RadButton ID="lstSubmit" runat="server" ButtonType="StandardButton" Text="Insert"
                                                    CommandName="PerformInsert">
                                                </telerik:RadButton>
                                                <telerik:RadButton ID="lstCance" runat="server" ButtonType="StandardButton" CommandName="Cancel"
                                                    Text="Cancel">
                                                </telerik:RadButton>
                                            </ContentTemplate>
                                        </telerik:RadWindow>
                                    </FormTemplate>
                                </EditFormSettings>.
    This is the code i have written.I want to find the controls of dropdownlist,textboxes etc and i wnat to insert the data entered in popup window into database .So please help me......
  8. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Jan 2013 Link to this post

    Hi,

    Try the following code to achieve your scenario.
    C#:
    protected void RadGrid2_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
        {
            GridEditFormItem item = (GridEditFormItem)e.Item;
            RadWindow window = (RadWindow)item.FindControl("RadWindow1");
            TextBox txt = (TextBox)window.ContentContainer.FindControl("TextBox3");
            DropDownList ddl = (DropDownList)window.ContentContainer.FindControl("cboProduct");
        }
    }

    Thanks,
    Shinu
  9. Balakrishna Reddy
    Balakrishna Reddy avatar
    37 posts
    Member since:
    Oct 2012

    Posted 17 Jan 2013 Link to this post

    protected void RadGrid2_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
        {
            GridEditFormItem item = (GridEditFormItem)e.Item;
            RadWindow window = (RadWindow)item.FindControl("RadWindow1");
               rdWindow.VisibleOnPageLoad = true;
            TextBox txt = (TextBox)window.ContentContainer.FindControl("TextBox3");
            DropDownList ddl = (DropDownList)window.ContentContainer.FindControl("cboProduct");
        }
    }

    my code is like this.when i am closing the window using Colse(X).. after that when ever i am changing the page index the window is again open.if i remove"rdWindow.VisibleOnPageLoad = true;" this window is not open at first time also...So please help me...........
  10. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Jan 2013 Link to this post

    Hi,

    Try the following code to open window on clicking edit button.
    C#:
    protected void RadGrid2_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = (GridDataItem)e.Item;
            LinkButton link= (LinkButton)item["edit"].Controls[0];
                  link.Attributes.Add("onclick", "openWind();return false;");
        }
    }
    JS:
    function openWind()
    {
     var oWnd = radopen("", "RadWindow1");
    }

    Thanks,
    Shinu
  11. Balakrishna Reddy
    Balakrishna Reddy avatar
    37 posts
    Member since:
    Oct 2012

    Posted 17 Jan 2013 Link to this post

    Hi Shinu,
       Thanks for your help,But the code which you provided is not working..Actually what i want means i want to display a RadWindow in insert mode of a RadGrid and i want to display data in editform type in edit mode of a RadGrid...So please help me.
  12. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 20 Jan 2013 Link to this post

    Hi,

    I suppose you want to show different forms on edit and insert. Here is the sample code.
    C#:
    protected void RadGrid2_ItemCommand(object sender, GridCommandEventArgs e)
    {
        if (e.CommandName == RadGrid.EditCommandName)
        {
           RadGrid2.MasterTableView.EditFormSettings.EditFormType = GridEditFormType.AutoGenerated;
        }
       if (e.CommandName == RadGrid.InitInsertCommandName)
        {
        RadGrid2.MasterTableView.EditFormSettings.EditFormType = GridEditFormType.Template;
        }
    }

    Thanks,
    Shinu
Back to Top