Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
710
Change tab SelectedIndex after row selection change
posted

I have a grid, wich is inside a tab with the key: "HotelsGrid". On my on row selection changed event, I need to disable the "HotelsGrid" tab, and enable and show the "HotelsEdit" tab with its content.

I am doing this, and before the migration from 11.1 to 13.2 it worked just fine:

uwtHotelsTab.Tabs.FindTabFromKey("HotelsGrid").Enabled = false;

uwtHotelsTab.Tabs.FindTabFromKey("HotelsEdit").Enabled = true;

uwtHotelsTab.SelectedIndex = uwtHotelsTab.Tabs.FindTabFromKey("HotelsEdit").Index;

 

 Now the tabs are not being enabled and disabled nor being changed.

Do I need to set something like "enable ajax" or something like that? here are my tabs:

 

<igtab:WebTabID="uwtHotelsTab"BrowserTarget="UpLevel"runat="server"Width="624px"

 Height="238px">

 <Tabs>

 <igtab:ContentTabItemText="&nbsp;Hotel List&nbsp;"Key="HotelsGrid">

 <Template>

 <igtbl:WebDataGridEnableDataViewState="True"CssClass="frameGridStyle"EditCellCssClass="editCellGridStyle"HeaderCssClass="headerGridStyle"ItemCssClass="rowItemGridStyleSmaller"AutoGenerateColumns="false"ShowHeader="true"ID="uwgHotelsList" runat="server"Width="624px"Height="165px"OnRowSelectionChanged="uwgHotelsList_SelectedRowsChange">

<Columns>

<igtbl:BoundDataFieldKey="HotelId"DataFieldName="HotelId"Hidden="true">

</igtbl:BoundDataField>

<igtbl:BoundDataFieldKey="Name"DataFieldName="Name"Width="600px">

<HeaderText="Hotel Name">

</Header>

</igtbl:BoundDataField>

</Columns>

<Behaviors>

<igtbl:ActivationEnabled="true"></igtbl:Activation>

<igtbl:RowSelectorsEnabled="false"></igtbl:RowSelectors>

<igtbl:SelectionEnabled="true"CellClickAction="Row"CellSelectType="Single"RowSelectType="Single">

 <AutoPostBackFlagsRowSelectionChanged="True"/>

 </igtbl:Selection>

 <igtbl:ColumnFixingEnabled="true"></igtbl:ColumnFixing>

 <igtbl:EditingCore>

 <Behaviors>

 <igtbl:RowAddingEnabled="true"></igtbl:RowAdding>

 </Behaviors>

 </igtbl:EditingCore>

 </Behaviors>

 </igtbl:WebDataGrid>

 <divstyle="padding-top: 2px; padding-bottom: 2px; padding-right: 1px; float: right">

 <asp:ButtonID="btnHotelsAdd"OnClick="btnHotelsAdd_Click"runat="server"Width="100px"

 Text="Add"/>

 </div>

 </Template>

 </igtab:ContentTabItem>

 <igtab:ContentTabItemKey="HotelsEdit"Text="&nbsp;Hotel Edition&nbsp;"Enabled="false">

 <Template>

 <divstyle="padding-left: 5px; overflow: auto; width: 623px; margin-left: auto; margin-right: auto;

 padding-top: 4px; height: 209px;">

 <divclass="line"style="height: 24px;">

 <spanclass="spanLabelLeft">Hotel Name</span>

 <asp:TextBoxID="txtHotelsName"runat="server"></asp:TextBox>

 <asp:CheckBoxID="chkHotelsHasRepricing2"CssClass="chkListItemAlign"Width="175px"

 TextAlign="Right"runat="server"Text="Has Repricing?"/>

 </div>

 <divclass="line"style="height: 24px;">

 <spanclass="spanLabelLeft">Account for Charges</span>

 <asp:TextBoxID="txtHotelsAccountForCharges"runat="server"></asp:TextBox>

 <spanclass="spanLabelLeft"style="width: 150px;">Number Tickets to Reprice</span>

 <ig:WebNumericEditorID="wneHotelsTicketsToReprice"DataMode="Int"MaxLength="4"

 NullText="0"MaxValue="9999"MinValue="0"runat="server"/>

 </div>

 <divclass="line"style="height: 24px;">

 <spanclass="spanLabelLeft">Tag Number Length</span>

 <ig:WebNumericEditorID="wneHotelsTagNumberLength"DataMode="Int"MaxLength="3"

 NullText="0"MaxValue="999"MinValue="0"runat="server"/>

 </div>

 <divclass="line"style="height: 24px;">

 <asp:CheckBoxID="chkHotelsTagIssuedByHotel"CssClass="chkListItemAlign"Width="270px"

 TextAlign="Right"runat="server"Text="A hotel tag is issued by the Hotel"/>

 <asp:CheckBoxID="chkHotelsGuestNameRequired"CssClass="chkListItemAlign"Width="270px"

 TextAlign="Right"runat="server"Text="Guest Name Required"/>

 </div>

 <divclass="line"style="height: 24px;">

 <asp:CheckBoxID="chkHotelsUniqueTagNumber"CssClass="chkListItemAlign"Width="270px"

 TextAlign="Right"runat="server"Text="Generate unique tag number"/>

 <asp:CheckBoxID="chkHotelsRoomNumberRequired"CssClass="chkListItemAlign"Width="270px"

 TextAlign="Right"runat="server"Text="Room Number Required"/>

 </div> 

<divclass="line"style="height: 24px;">

 <asp:CheckBoxID="chkHotelsPrintVoucher"CssClass="chkListItemAlign"Width="270px"

 TextAlign="Right"runat="server"Text="Print Vouchers"/>

 <asp:CheckBoxID="chkHotelsNoChargeWhenNoBalance"CssClass="chkListItemAlign"Width="270px"

 TextAlign="Right"runat="server"Text="No Charge when no Balance accepted"/>

 </div>

 <divclass="line"style="height: 24px;">

 <asp:CheckBoxID="chkHotelsCashierInitialsRequired"CssClass="chkListItemAlign"Width="270px"

 TextAlign="Right"runat="server"Text="Cashier Initials Required"/>

 <asp:CheckBoxID="chkHotelsVoidsAccepted"CssClass="chkListItemAlign"Width="270px"

 TextAlign="Right"runat="server"Text="Voids Accepted"/>

 </div>

 <divclass="line"style="height: 24px;">

  <asp:CheckBoxID="chkHotelsChargeDuringTrackingReport"CssClass="chkListItemAlign"

 Width="270px"TextAlign="Right"runat="server"Text="Open Tickets Charge"/>

 <asp:CheckBoxID="chkHotelsPrintChargesReportAtEod"CssClass="chkListItemAlign"Width="270px"

 TextAlign="Right"runat="server"Text="Print Charges Report at EOD"/>

 </div>

 <divclass="line"style="height: 24px;">

 <asp:CheckBoxID="chkHotelsIncludeInStandardOpenTickets"CssClass="chkListItemAlign"

 Width="270px"TextAlign="Right"runat="server"Text="Include in Standard Open Tickets"/>

 <spanclass="spanLabelLeft">Function Key</span>

 <asp:TextBoxID="txtHotelsFunctionKey"Width="90px"runat="server"Text="Function Key"/>

 </div>

 <fieldset>

 <legend>Multiple Exits</legend>

 <divclass="line"style="height: 24px;">

 <spanclass="spanLabel"style="width: 90px;">Maximum</span>

 <ig:WebNumericEditorID="wneHotelsMultipleExitMaximum"DataMode="Int"MaxLength="4"

 NullText="0"MaxValue="9999"MinValue="0"runat="server"/>

 <spanclass="spanLabel">Free</span>

 <ig:WebNumericEditorID="wneHotelsMultipleExitsFree"DataMode="Int"MaxLength="4"

NullText="0"MaxValue="9999"MinValue="0"runat="server"/>

 <spanclass="spanLabel">Fee</span>

 <ig:WebNumericEditorID="wneHotelsMultipleExitsFee"DataMode="Int"MaxLength="4"

NullText="0"MaxValue="9999"MinValue="0"runat="server"/>

 </div>

</fieldset>

 <fieldsetstyle="width: 645px; margin-left: auto; margin-right: auto; background: #F2FCFF;">

 <legendstyle="font-size: x-small;">&nbsp;Checkout Time&nbsp;</legend>

 <divstyle="height: 30px; padding-left: 49px;">

 <divclass="line"style="width: 550px; margin-left: auto; margin-right: auto;">

 <asp:CheckBoxID="chkHotelsCheckoutTimeRequired"CssClass="chkListItemAlign"Width="214px"

 runat="server"TextAlign="Right"Text="Time Required"ToolTip="<%$Resources:ToolTips,CC_HotelLocationPolicies_Transients_CheckoutTime_Required %>"/>

 <spanclass="spanLabel"style="width: 108px;">Time Format</span><asp:DropDownList

 ID="cmbHotelsTimeFormat"runat="server"ToolTip="<%$ Resources:ToolTips, CC_HotelLocationPolicies_Transients_CheckoutTime_Format %>"

 />

 </div>

 </div>

 </fieldset>

 <divstyle="float: right; padding-top: 4px; padding-bottom: 5px;">

 <asp:ButtonID="btnHotelsEditOk"OnClick="btnHotelsEditOk_Click"runat="server"Width="100px"

 Text="OK"/>

 <spanclass="spanSeparator"></span>

 <asp:ButtonID="btnHotelsEditCancel"OnClick="btnHotelsEditCancel_Click"runat="server"

 Width="100px"Text="Cancel"/>

 <spanclass="spanSeparator"></span>

 <asp:ButtonID="btnHotelsDelete"OnClick="btnHotelsDelete_Click"OnClientClick="if(!confirm('Are you sure to delete the hotel?')) return false;"

 runat="server"Width="100px"Text="Delete"/>

 </div>

 </div>

 </Template>

 </igtab:ContentTabItem>

 </Tabs>

</igtab:WebTab>

 

 

 

Thank you very much!