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

The window is displayed without calling

2 Answers 34 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Jhon Williams
Top achievements
Rank 1
Jhon Williams asked on 27 May 2013, 01:38 AM
Hello

I'm having trouble with a RadWindow, but first I want to quickly explain the order of the items that I have on the page.

Please see image001.png code corresponding to the following

<td colspan="6">
                   <telerik:RadTabStrip ID="tabInformation" runat="server" SelectedIndex="0" Width="100%"
                       MultiPageID="RadMultiPage1" CausesValidation="False" OnTabClick="tabInformation_TabClick">
                       <Tabs>
                           <telerik:RadTab runat="server" Text="Comentarios" Selected="True" PageViewID="Comments">
                           </telerik:RadTab>
                           <telerik:RadTab runat="server" Text="Teléfonos" PageViewID="Phones">
                           </telerik:RadTab>
                           <telerik:RadTab runat="server" Text="Direcciones" PageViewID="Address">
                           </telerik:RadTab>
                           <telerik:RadTab runat="server" Text="Correos Electrónicos" PageViewID="Emails">
                           </telerik:RadTab>
                       </Tabs>
                   </telerik:RadTabStrip>
                   <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">
 
                       <telerik:RadPageView ID="RadPageView4" runat="server" Width="100%">
                           <telerik:RadTextBox ID="txtComments" runat="server" Height="100px" TextMode="MultiLine" Width="550px"></telerik:RadTextBox>
                       </telerik:RadPageView>
                       <telerik:RadPageView ID="RadPageView1" runat="server">
                           <telerik:RadToolBar ID="radPhones" runat="server" OnButtonClick="radPhones_ButtonClick">
                               <Items>
                                   <telerik:RadToolBarButton runat="server" CommandName="New" ImageUrl="~/Images/ToolBar/new.png"
                                       Text="Nuevo" CausesValidation="false">
                                   </telerik:RadToolBarButton>
                               </Items>
                           </telerik:RadToolBar>
                           <telerik:RadGrid ID="dtgPhones" runat="server" AutoGenerateColumns="False" CellSpacing="0" GridLines="None">
                               <ExportSettings>
                                   <Pdf PageWidth="" />
                               </ExportSettings>
                               <MasterTableView NoMasterRecordsText="No hay registros para mostrar.">
                                   <CommandItemSettings ExportToPdfText="Export to PDF" />
                                   <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True"></RowIndicatorColumn>
                                   <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True"></ExpandCollapseColumn>
                                   <Columns>
                                       <telerik:GridBoundColumn DataField="PHONE_ID" FilterControlAltText="Filter PHONE_ID column" HeaderText="ID" UniqueName="PHONE_ID" Visible="false"></telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn DataField="PERSON_ID" FilterControlAltText="Filter PERSON_ID column" HeaderText="ID_PERSON" UniqueName="PERSON_ID" Visible="false"></telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn DataField="INDICATIVE" FilterControlAltText="Filter INDICATIVE column" HeaderText="Indicativo" UniqueName="INDICATIVE"></telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn DataField="PHONE" FilterControlAltText="Filter NUMERO column" HeaderText="Número" UniqueName="NUMERO"></telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn DataField="EXTENSION" FilterControlAltText="Filter EXTENSION column" HeaderText="Ext." UniqueName="EXTENSION"></telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn DataField="TYPE_DESCRIPTION" FilterControlAltText="Filter TYPE_DESCRIPTION column" HeaderText="Tipo" UniqueName="TYPE_DESCRIPTION"></telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn DataField="TYPE" FilterControlAltText="Filter TYPE column" HeaderText="Tipo" UniqueName="TYPE" Visible="False">
                                       </telerik:GridBoundColumn>
                                       <telerik:GridCheckBoxColumn DataField="PRINCIPAL" FilterControlAltText="Filter PRINCIPAL column" HeaderText="Principal" UniqueName="PRINCIPAL">
                                           <HeaderStyle HorizontalAlign="Center" />
                                           <ItemStyle HorizontalAlign="Center" />
                                       </telerik:GridCheckBoxColumn>
                                       <telerik:GridCheckBoxColumn DataField="ACTIVE" FilterControlAltText="Filter ACTIVE column" HeaderText="Active" UniqueName="ACTIVE">
                                           <HeaderStyle HorizontalAlign="Center" />
                                           <ItemStyle HorizontalAlign="Center" />
                                       </telerik:GridCheckBoxColumn>
                                   </Columns>
                                   <PagerStyle PageSizeControlType="RadComboBox" />
                               </MasterTableView><PagerStyle PageSizeControlType="RadComboBox" />
                               <FilterMenu EnableImageSprites="False"></FilterMenu>
                           </telerik:RadGrid>
                       </telerik:RadPageView>
 
                       <telerik:RadPageView ID="RadPageView2" runat="server">
                           <telerik:RadGrid ID="dtgAddress" runat="server" AutoGenerateColumns="False" CellSpacing="0" GridLines="None">
                               <ExportSettings>
                                   <Pdf PageWidth="" />
                               </ExportSettings>
                               <MasterTableView NoMasterRecordsText="No hay registros para mostrar.">
                                   <CommandItemSettings ExportToPdfText="Export to PDF" />
                                   <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                                       <HeaderStyle Width="20px" />
                                   </RowIndicatorColumn>
                                   <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                                       <HeaderStyle Width="20px" />
                                   </ExpandCollapseColumn>
                                   <Columns>
                                       <telerik:GridBoundColumn DataField="ADDRESS_ID" FilterControlAltText="Filter ADDRESS_ID column" HeaderText="ID" UniqueName="ADDRESS_ID" Visible="false"></telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn DataField="PERSON_ID" FilterControlAltText="Filter PERSON_ID column" HeaderText="PersonID" UniqueName="PERSON_ID" Visible="false"></telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn DataField="ADDRESS" FilterControlAltText="Filter ADDRESS column" HeaderText="Dirección" UniqueName="ADDRESS"></telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn DataField="TYPE" FilterControlAltText="Filter TYPE column" HeaderText="Tipo" UniqueName="TYPE" Visible="false"></telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn DataField="TYPE_DESCRIPTION" FilterControlAltText="Filter TYPE_DESCRIPTION column" HeaderText="Tipo" UniqueName="TYPE_DESCRIPTION"></telerik:GridBoundColumn>
                                       <telerik:GridCheckBoxColumn DataField="PRINCIPAL" FilterControlAltText="Filter PRINCIPAL column" HeaderText="Principal" UniqueName="PRINCIPAL">
                                           <HeaderStyle HorizontalAlign="Center" />
                                           <ItemStyle HorizontalAlign="Center" />
                                       </telerik:GridCheckBoxColumn>
                                       <telerik:GridCheckBoxColumn DataField="ACTIVE" FilterControlAltText="Filter ACTIVE column" HeaderText="Active" UniqueName="ACTIVE">
                                           <HeaderStyle HorizontalAlign="Center" />
                                           <ItemStyle HorizontalAlign="Center" />
                                       </telerik:GridCheckBoxColumn>
                                   </Columns>
                                   <PagerStyle PageSizeControlType="RadComboBox" />
                               </MasterTableView>
                               <PagerStyle PageSizeControlType="RadComboBox" />
                               <FilterMenu EnableImageSprites="False">
                               </FilterMenu>
                           </telerik:RadGrid>
                       </telerik:RadPageView>
                       <telerik:RadPageView ID="RadPageView3" runat="server">
                           <telerik:RadGrid ID="dtgEmails" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AutoGenerateColumns="False" CellSpacing="0" GridLines="None">
                               <ExportSettings>
                                   <Pdf PageWidth="" />
                               </ExportSettings>
                               <MasterTableView NoMasterRecordsText="No hay registros para mostrar.">
                                   <CommandItemSettings ExportToPdfText="Export to PDF" />
                                   <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                                       <HeaderStyle Width="20px" />
                                   </RowIndicatorColumn>
                                   <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                                       <HeaderStyle Width="20px" />
                                   </ExpandCollapseColumn>
                                   <Columns>
                                       <telerik:GridBoundColumn DataField="MAIL_ID" FilterControlAltText="Filter MAIL_ID column" HeaderText="ID" UniqueName="MAIL_ID" Visible="false"></telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn DataField="PERSON_ID" FilterControlAltText="Filter PERSON_ID column" HeaderText="PersonID" UniqueName="PERSON_ID" Visible="false"></telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn DataField="EMAIL" FilterControlAltText="Filter EMAIL column" HeaderText="Correo" UniqueName="EMAIL"></telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn DataField="TYPE" FilterControlAltText="Filter TYPE column" HeaderText="Tipo" UniqueName="TYPE" Visible="false"></telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn DataField="TYPE_DESCRIPTION" FilterControlAltText="Filter TYPE_DESCRIPTION column" HeaderText="Tipo" UniqueName="TYPE_DESCRIPTION"></telerik:GridBoundColumn>
                                       <telerik:GridCheckBoxColumn DataField="PRINCIPAL" FilterControlAltText="Filter PRINCIPAL column" HeaderText="Principal" UniqueName="PRINCIPAL">
                                           <HeaderStyle HorizontalAlign="Center" />
                                           <ItemStyle HorizontalAlign="Center" />
                                       </telerik:GridCheckBoxColumn>
                                       <telerik:GridCheckBoxColumn DataField="ACTIVE" FilterControlAltText="Filter ACTIVE column" HeaderText="Active" UniqueName="ACTIVE">
                                           <HeaderStyle HorizontalAlign="Center" />
                                           <ItemStyle HorizontalAlign="Center" />
                                       </telerik:GridCheckBoxColumn>
                                   </Columns>
                                   <EditFormSettings>
                                       <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                       </EditColumn>
                                   </EditFormSettings>
                                   <PagerStyle PageSizeControlType="RadComboBox" />
                               </MasterTableView>
                               <PagerStyle PageSizeControlType="RadComboBox" />
                               <FilterMenu EnableImageSprites="False">
                               </FilterMenu>
                           </telerik:RadGrid>
                       </telerik:RadPageView>
 
                   </telerik:RadMultiPage>
                   <telerik:RadWindowManager ID="RadWindowEditors" runat="server" Behaviors="Resize, Close, Move" VisibleStatusbar="False"></telerik:RadWindowManager>
               </td>

This is the problem
You can navigate the tabs without problems, but if the user is in the tab "Telefonos" and press the button Nuevo (New) shows the window see imagen002.png, the user can save or close and the window disappears, but when switching between tabs, the window reappears, as if the user would click on the button again.

The code of the Nuevo (New) button is as follows:

RadWindowEditors.Modal = true;
RadWindowEditors.CenterIfModal = true;
 
string url = string.Format("PersonsPhonesEditor.aspx?action=new&personID={0}", lblIDPerson.Text.Trim());
 
RadWindow newWindow = new RadWindow();
newWindow.NavigateUrl = url;
newWindow.VisibleOnPageLoad = true;
newWindow.Height = 300;
newWindow.Width = 550;
RadWindowEditors.Windows.Add(newWindow);


Thanks


2 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 29 May 2013, 03:01 PM
Hello Jhon,

The problem you are currently facing, is originated by the fact that you are configuring the RadWindow with VisibleOnPageLoad property set to true, which reflects as opening the window, each time you click on a certain RadTab. I would suggest you to set the EnableViewState property of the RadWindowManager to false, in order to overcome the problematic behavior.

Regards,
Nencho
Telerik
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.
0
Jhon Williams
Top achievements
Rank 1
answered on 31 May 2013, 03:04 AM
It worked, thank you very much
Tags
TabStrip
Asked by
Jhon Williams
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Jhon Williams
Top achievements
Rank 1
Share this question
or