This is a migrated thread and some comments may be shown as answers.

radwindow continues to popup after clicking edit button

6 Answers 128 Views
Window
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 2
Bill asked on 24 Jun 2010, 04:40 PM
I have a radgrid with an edit button, some columns and a image button that will pop up a modal radwindow from the code behind.

Aftter clicking the image button, the popup comes up with no issues and then close it. After cliciking the edit button, the edit form comes up fine, but the radwindow also pops up again and must manually close it. It pops up without me actually clicking on the image button to pop it up again. It's very annoying for the user since they have to close it each time when they simply just want to edit a record.

Here is my abbreviated html:
<code>

<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>
           
        </Windows>
    </telerik:RadWindowManager>

<telerik:RadGrid ID="RadGrid1" runat="server" Skin="Outlook" AutoGenerateColumns="False" OnItemCommand="RadGrid1_ItemCommand"
                        OnNeedDataSource="RadGrid1_NeedDataSource" OnItemDataBound="RadGrid1_ItemDataBound"
                        OnInsertCommand="RadGrid1_InsertCommand" OnUpdateCommand="RadGrid1_UpdateCommand"
                        AllowPaging="True" AllowSorting="True" PageSize="20" GridLines="None">
                        <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="Provider_FacilityID"
                            EditMode="EditForms">
                            <Columns>
                                <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="../images/icon_edit.gif"
                                    UniqueName="EditCommandColumn">
                                    <HeaderStyle Width="20px" />
                                </telerik:GridEditCommandColumn>
                                <telerik:GridBoundColumn UniqueName="provider" HeaderText="Provider" DataField="provider">
                                </telerik:GridBoundColumn>
                               
                                <telerik:GridBoundColumn UniqueName="providerStatus" HeaderText="ProviderStatus"
                                    DataField="providerStatus" HtmlEncode="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridDateTimeColumn DataField="ProviderFacilityStartDate" HeaderText="Start Date"
                                    DataFormatString="{0:MM/dd/yyyy}" UniqueName="ProviderFacilityStartDate" AutoPostBackOnFilter="true">
                                </telerik:GridDateTimeColumn>
                                <telerik:GridDateTimeColumn DataField="ProviderFacilityEndDate" HeaderText="End Date"
                                    DataFormatString="{0:MM/dd/yyyy}" UniqueName="ProviderFacilityEndDate" AutoPostBackOnFilter="true">
                                </telerik:GridDateTimeColumn>
                                <telerik:GridBoundColumn UniqueName="workStatus" HeaderText="Facility Rel Status"
                                    DataField="workStatus" HtmlEncode="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridDateTimeColumn DataField="PrivilegesGrantedDate" HeaderText="Privileges Granted"
                                    DataFormatString="{0:MM/dd/yyyy}" UniqueName="PrivilegesGrantedDate" AutoPostBackOnFilter="true">
                                </telerik:GridDateTimeColumn>
                                <telerik:GridDateTimeColumn DataField="PrivilegesExpiration" HeaderText="Privileges Expiration"
                                    DataFormatString="{0:MM/dd/yyyy}" UniqueName="PrivilegesExpiration" AutoPostBackOnFilter="true">
                                </telerik:GridDateTimeColumn>
                                <telerik:GridBoundColumn UniqueName="PrivilegeStatus" HeaderText="Privilege Status"
                                    DataField="PrivilegeStatus" HtmlEncode="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="FacilityID" HeaderText="FacilityID" DataField="FacilityID"
                                    HtmlEncode="true" Visible="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="ProviderID" HeaderText="ProviderID" DataField="ProviderID"
                                    HtmlEncode="true" Visible="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn UniqueName="Provider_FacilityID" HeaderText="Provider_FacilityID"
                                    DataField="Provider_FacilityID" HtmlEncode="true" Visible="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="" UniqueName="changeSeq1">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="relation" runat="server" ImageUrl="~/images/folder-documents.png"
                                            OnClick="relationship_Click" ToolTip="Relationship" />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="" UniqueName="changeSeq2">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="EnrollForm" runat="server" ImageUrl="~/images/icon_document.gif"
                                            OnClick="enrollmentForm_Click" ToolTip="Enrollment Form" />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                            </Columns>
                            <EditFormSettings EditFormType="Template">
                                <EditColumn UniqueName="EditCommandColumn1">
                                </EditColumn>
                                <FormTemplate>
                                    <table id="Table2" border="0" cellpadding="1" cellspacing="2" rules="none" style="border-collapse: collapse;
                                        background: white;" width="100%">
                                        <tr valign="top">
                                            <td>
                                                <asp:Panel ID="Panel1" runat="server" GroupingText="Provider Facility Relationship">
                                                    <table id="Table3" border="0" cellpadding="1" cellspacing="1" width="100%">
                                                        <tr>
                                                            <td style="width: 186px" class="td_AEV">
                                                                Provider
                                                            </td>
                                                            <td class="td_AEVNoBold">
                                                                <asp:DropDownList ID="drpProvider" runat="server">
                                                                </asp:DropDownList>
                                                            </td>
                                                        </tr>
                                                        <tr valign="top">
                                                            <td style="width: 186px" class="td_AEV">
                                                                Work Status
                                                            </td>
                                                            <td class="td_AEVNoBold">
                                                                <asp:DropDownList ID="WorkStatusID" runat="server" DataSourceID="LinqDataSource1"
                                                                    DataTextField="Description" DataValueField="WorkStatusID" AppendDataBoundItems="true"
                                                                    SelectedValue='<%# Bind("WorkStatusID") %>'>
                                                                    <asp:ListItem Text="" Selected="True" Value=""></asp:ListItem>
                                                                </asp:DropDownList>
                                                                <span style="color: Red">*</span>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                                                                    ControlToValidate="WorkStatusID" ErrorMessage=" Required Field"></asp:RequiredFieldValidator>
                                                                <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="HPPInfoNet.Data.hppInfoNet2DataContext"
                                                                    Select="new (Description, WorkStatusID)" TableName="WorkStatus">
                                                                </asp:LinqDataSource>
                                                               
                                                            </td>
                                                        </tr>
                                                        <tr valign="top">
                                                            <td style="width: 186px" class="td_AEV">
                                                                Start Date
                                                            </td>
                                                            <td class="td_AEVNoBold">
                                                                <telerik:RadDatePicker ID="ProviderFacilityStartDate" runat="server" DataFormatString="{0:MM/dd/yyyy}">
                                                                </telerik:RadDatePicker>
                                                            </td>
                                                        </tr>
                                                        <tr valign="top">
                                                            <td style="width: 186px" class="td_AEV">
                                                                End Date
                                                            </td>
                                                            <td class="td_AEVNoBold">
                                                                <telerik:RadDatePicker ID="ProviderFacilityEndDate" runat="server" DataFormatString="{0:MM/dd/yyyy}">
                                                                </telerik:RadDatePicker>
                                                            </td>
                                                        </tr>
                                                        <tr valign="top">
                                                            <td style="width: 186px" class="td_AEV">
                                                                Relationship Status
                                                            </td>
                                                            <td class="td_AEVNoBold">
                                                                <asp:DropDownList ID="PhysicianStatusID" runat="server" DataSourceID="LinqDataSource2"
                                                                    DataTextField="Description" DataValueField="PhysicianStatusID" AppendDataBoundItems="true"
                                                                    SelectedValue='<%# Bind("PhysicianStatusID") %>'>
                                                                    <asp:ListItem Text="" Selected="True" Value=""></asp:ListItem>
                                                                </asp:DropDownList>
                                                                <span style="color: Red">*</span>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                                                                    ControlToValidate="PhysicianStatusID" ErrorMessage=" Required Field"
                                                                    ></asp:RequiredFieldValidator>
                                                                <asp:LinqDataSource ID="LinqDataSource2" runat="server" ContextTypeName="HPPInfoNet.Data.hppInfoNet2DataContext"
                                                                    Select="new (Description, PhysicianStatusID)" TableName="PhysicianStatus">
                                                                </asp:LinqDataSource>
                                                               
                                                            </td>
                                                        </tr>
                                                        <tr valign="top">
                                                            <td style="width: 186px" class="td_AEV">
                                                                Privileges Granted Date
                                                            </td>
                                                            <td class="td_AEVNoBold">
                                                                <telerik:RadDatePicker ID="PrivilegesGrantedDate" runat="server" DataFormatString="{0:MM/dd/yyyy}">
                                                                </telerik:RadDatePicker>
                                                            </td>
                                                        </tr>
                                                        <tr valign="top">
                                                            <td style="width: 186px" class="td_AEV">
                                                                Privileges Expiration Date
                                                            </td>
                                                            <td class="td_AEVNoBold">
                                                                <telerik:RadDatePicker ID="PrivilegesExpiration" runat="server" DataFormatString="{0:MM/dd/yyyy}">
                                                                </telerik:RadDatePicker>
                                                            </td>
                                                        </tr>
                                                        <tr valign="top">
                                                            <td style="width: 186px" class="td_AEV">
                                                                Privileges Status
                                                            </td>
                                                            <td class="td_AEVNoBold">
                                                                <asp:DropDownList ID="PrivilegeStatusID" runat="server" DataSourceID="LinqDataSource3"
                                                                    DataTextField="Description" DataValueField="PrivilegeStatusID" AppendDataBoundItems="true"
                                                                    SelectedValue='<%# Bind("PrivilegeStatusID") %>'>
                                                                    <asp:ListItem Text="---" Selected="True" Value=""></asp:ListItem>
                                                                </asp:DropDownList>
                                                                <asp:LinqDataSource ID="LinqDataSource3" runat="server" ContextTypeName="HPPInfoNet.Data.hppInfoNet2DataContext"
                                                                    Select="new (Description, PrivilegeStatusID)" TableName="PrivilegeStatus">
                                                                </asp:LinqDataSource>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td style="width: 186px" class="td_AEV">
                                                                &nbsp;
                                                            </td>
                                                            <td align="left" class="td_AEVNoBold">
                                                                <asp:Button ID="Button3" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                                                    runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                                                </asp:Button>&nbsp;
                                                                <asp:Button ID="Button4" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
                                                                </asp:Button>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </asp:Panel>
                                            </td>
                                        </tr>
                                    </table>
                                </FormTemplate>
                            </EditFormSettings>
                        </MasterTableView>
                    </telerik:RadGrid>
</code>

Here is my code-behind:
<code>

protected void relationship_Click(object sender, ImageClickEventArgs e)
        {

            RadWindowManager1.Windows.Clear();

            RadWindow newwindow = new RadWindow();
            newwindow.ID = "RadWindow1";  //"RadWindow1";
            newwindow.Width = 1000;
            newwindow.Height = 600;
            newwindow.Modal = true;
            newwindow.VisibleOnPageLoad = true;
            newwindow.DestroyOnClose = true;
            newwindow.NavigateUrl = "../relationship/prvFacRelationship.aspx?usrname=" + ViewState["UserName"].ToString() + "&usremail=" + ViewState["UserEmail"].ToString() + "&pfID=" + pfID;
            RadWindowManager1.Windows.Add(newwindow);
        }


</code>

What can I do to make the popup stop popping up when I simply click on the edit button? If no solution, is there an update to the control set I need to use, etc. I am using version 2009.3.1314.35 of the controls.

Thanks,

Bill........

6 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 25 Jun 2010, 08:46 AM
Hello William,

Try setting EnableViewState to false to the RadWindowManager. Since RadWindow for ASP.NET AJAX Q3 2009 when a RadWindow is declared in  RadWindowManager it preserves its ViewState which was not so in previous versions.

Sincerely yours,
Georgi Tunev
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
0
Bill
Top achievements
Rank 2
answered on 25 Jun 2010, 03:46 PM
Georgi, I did what you said, but I am still getting the exact same behaivor with the way the window keeps popping up.

Here is my code behind:
<code>

RadWindowManager1.Windows.Clear();

 

RadWindow newwindow = new RadWindow();

 

newwindow.ID =

"RadWindow1"; //"RadWindowZ";

 

newwindow.Width = 1000;

newwindow.Height = 600;

newwindow.Modal =

true;

 

newwindow.VisibleOnPageLoad =

true;

 

newwindow.DestroyOnClose =

true;

 

newwindow.EnableViewState =

false;

 

newwindow.NavigateUrl =

"../relationship/prvFacRelationship.aspx?usrname=" + ViewState["UserName"].ToString() + "&usremail=" + ViewState["UserEmail"].ToString() + "&pfID=" + pfID;

 

RadWindowManager1.Windows.Add(newwindow);

</code>

Please advise what I can do next to possibly resolve the issue.

0
Georgi Tunev
Telerik team
answered on 28 Jun 2010, 01:42 PM
Hi Bill,

I see that you have posted in the another forum thread on a similar subject. Is everything OK now? If no, please open a support ticket and send a sample project so I could check it.



Kind regards,
Georgi Tunev
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
0
Bill
Top achievements
Rank 2
answered on 28 Jun 2010, 03:33 PM
Georgi, that other post resolved one issue. The other issue is not resolved. How do I open a support ticket and send you the files? Aren't the files just limited to .png files?

Bill.
0
Bill
Top achievements
Rank 2
answered on 28 Jun 2010, 09:04 PM
Georgi, this has been resolved....

I set the Viewstate to FALSE on the RAdWindow manager instead of the object and it resolved the issue.

Thanks,

bill.
0
Georgi Tunev
Telerik team
answered on 29 Jun 2010, 02:16 PM

Yes, EnableViewState should be set to the RadWindowManager :) I am glad that everything is working fine now.



Best wishes,
Georgi Tunev
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
Tags
Window
Asked by
Bill
Top achievements
Rank 2
Answers by
Georgi Tunev
Telerik team
Bill
Top achievements
Rank 2
Share this question
or