
Hanso Gnana
Top achievements
Rank 1
Hanso Gnana
asked on 11 Aug 2010, 02:15 AM
Hi,
I'm trying to pre-select a tab in a TabStrip control from the server-side using the following code snippet in C#:
RadTabStripReportParams.FindTabByText("Standard").Selected = true;
The problem is when this is done, the "Standard" tab gets selected as required, but it's contents (i.e. the controls within it) are not updated (i.e. the controls from the previous tab are still displayed). This only happens when attempting the functionality server-side. The client-side options work as intended when coded as follows:
var tabStandard = tabsParams.findTabByText("Standard");
tabStandard.select();
Am I missing something? Can anyone help me shed some light on why the server-side option doesn't work as intended, or let me know if there are any work-arounds?
I'm trying to pre-select a tab in a TabStrip control from the server-side using the following code snippet in C#:
RadTabStripReportParams.FindTabByText("Standard").Selected = true;
The problem is when this is done, the "Standard" tab gets selected as required, but it's contents (i.e. the controls within it) are not updated (i.e. the controls from the previous tab are still displayed). This only happens when attempting the functionality server-side. The client-side options work as intended when coded as follows:
var tabStandard = tabsParams.findTabByText("Standard");
tabStandard.select();
Am I missing something? Can anyone help me shed some light on why the server-side option doesn't work as intended, or let me know if there are any work-arounds?
6 Answers, 1 is accepted
0
Accepted
Hello Sivas,
You'll need to set the SelectedIndex property to the RadMultiPage too. Here's a sample code:
Hope this helps.
All the best,
Veronica Milcheva
the Telerik team
You'll need to set the SelectedIndex property to the RadMultiPage too. Here's a sample code:
RadTab tab = RadTabStrip1.FindTabByText(
"Colors"
);
tab.Selected =
true
;
int
index = tab.Index;
RadMultiPage1.SelectedIndex = index;
Hope this helps.
All the best,
Veronica Milcheva
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

Hanso Gnana
Top achievements
Rank 1
answered on 12 Aug 2010, 01:01 AM
Thanks. Worked a treat!
0

Augusto Cosatti
Top achievements
Rank 1
answered on 27 Sep 2010, 10:46 AM
Hello.
I have the same problem and I have tried your solution but unfortunately it doesn't work.
I have two tabs. In the first tab I have filters for a query. In the second tab I have a grid that shows records from the query result set.
After I click on a button I get the records from a database and I fill in the grid. Then I select the second tab so that the user is switched from the filters to the results tab automatically. At this point the tab is selected but the content of the tab is the content of the first tab (the filters). To get the content of the 2nd tab (the grid) I have to click on the first tab and then on the second tab.
Here is the code I'm using
Can you please help me?
Thanks
Regards
Augusto
I have the same problem and I have tried your solution but unfortunately it doesn't work.
I have two tabs. In the first tab I have filters for a query. In the second tab I have a grid that shows records from the query result set.
After I click on a button I get the records from a database and I fill in the grid. Then I select the second tab so that the user is switched from the filters to the results tab automatically. At this point the tab is selected but the content of the tab is the content of the first tab (the filters). To get the content of the 2nd tab (the grid) I have to click on the first tab and then on the second tab.
Here is the code I'm using
Can you please help me?
Thanks
Regards
Augusto
<
telerik:RadAjaxManagerProxy
ID
=
"RadAjaxManagerProxyFilters"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"LinkButtonSearch"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"PanelFilters"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"PanelDataGrid"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadTabStripMain"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
<
telerik:RadTabStrip
ID
=
"RadTabStripMain"
runat
=
"server"
MultiPageID
=
"RadMultiPageMain"
SelectedIndex
=
"0"
Width
=
"100%"
>
<
Tabs
>
<
telerik:RadTab
Text
=
"Select Filters"
Value
=
"Filters"
>
</
telerik:RadTab
>
<
telerik:RadTab
Text
=
"Transactions"
Value
=
"Transactions"
>
</
telerik:RadTab
>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"RadMultiPageMain"
runat
=
"server"
SelectedIndex
=
"0"
>
<
telerik:RadPageView
ID
=
"RadPageViewFilters"
runat
=
"server"
>
<
asp:Panel
ID
=
"PanelFilters"
runat
=
"server"
Visible
=
"true"
>
<
table
cellpadding
=
"0"
cellspacing
=
"0"
border
=
"0"
width
=
"99%"
">
<
tr
>
...
</
table
>
</
asp:Panel
>
</
telerik:RadPageView
>
<
telerik:RadPageView
ID
=
"RadPageViewTransactions"
runat
=
"server"
>
<
asp:Panel
ID
=
"PanelDataGrid"
runat
=
"server"
Visible
=
"true"
>
<
table
id
=
"MainTable"
style
=
"z-index: 102; table-layout:fixed"
cellspacing
=
"0"
cellpadding
=
"0"
border
=
"0"
width
=
"100%"
>
<
tr
>
<
td
>
<
telerik:RadGrid
ID
=
"RadGridTransactions"
runat
=
"server"
>
<
MasterTableView
>
<
Columns
>
...
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
td
>
</
tr
>
</
table
>
</
asp:Panel
>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
private
void
LinkButtonSearch_Click(
object
sender, MasterPageControlEventArgs e) {
// Switch to the result tab
RadTab tab =
this
.RadTabStripMain.FindTabByValue(
"Transactions"
);
tab.Selected =
true
;
RadMultiPageMain.SelectedIndex = tab.Index;
this
.RadTabStripMain.SelectedIndex = tab.Index;
// Fill in the grid
this
.DisplayTransactions();
}
0

Augusto Cosatti
Top achievements
Rank 1
answered on 29 Sep 2010, 07:54 AM
Hello.
I have found how to solve this issue.
I have put the RadTabStrip and RadMultiPage controls inside a Panel and that panel is updated in the Ajax Manager proxy.
I hope this can help other people.
Best regards
Augusto
<
telerik:RadAjaxManagerProxy
ID
=
"RadAjaxManagerProxyFilters"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"LinkButtonSearch"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"PanelMain"
LoadingPanelID
=
"RadAjaxLoadingPanel"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
...
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
...
<
asp:Panel
ID
=
"PanelMain"
runat
=
"server"
Visible
=
"true"
>
<
telerik:RadTabStrip
ID
=
"RadTabStripMain"
runat
=
"server"
MultiPageID
=
"RadMultiPageMain"
SelectedIndex
=
"0"
Width
=
"100%"
>
<
Tabs
>
<
telerik:RadTab
Text
=
"Select Filters"
CssClass
=
"TabStrip"
Value
=
"Filters"
>
</
telerik:RadTab
>
<
telerik:RadTab
Text
=
"Transactions"
CssClass
=
"TabStrip"
Value
=
"Transactions"
>
</
telerik:RadTab
>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"RadMultiPageMain"
runat
=
"server"
SelectedIndex
=
"0"
>
<
telerik:RadPageView
ID
=
"RadPageViewFilters"
runat
=
"server"
>
...
</
telerik:RadPageView
>
<
telerik:RadPageView
ID
=
"RadPageViewTransactions"
runat
=
"server"
>
...
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
</
asp:Panel
>
0
Hi Augusto Cosatti,
I'm glad you found the solution. Feel free to ask me if you have further questions.
Best wishes,
Veronica Milcheva
the Telerik team
I'm glad you found the solution. Feel free to ask me if you have further questions.
Best wishes,
Veronica Milcheva
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
Hello Augusto Cosatti,
Regards,
Peter
the Telerik team
Regards,
Peter
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