PDA

View Full Version : [CLOSED] [#506] TabPanel + ItemsFromPartial + ActiveTabIndex



alex303
Jun 09, 2014, 2:27 PM
Please take a look at the sinppet:

some.cshtml



@{
var treeTabPanel = ext.TabPanel();
foreach(var tree in Model.Trees) {
treeTabPanel.ItemsFromPartial("Tree", tree);
}
treeTabPanel.ActiveTabIndex(2); // --- exception!
}


at the last line I have got an exception:
"The .ActiveTabIndex value was set to the index of an item which does not exist in the 'id4dd582df60c6568d' Items Collection.
The .ActiveTabIndex can not be set to a value > -1.
The actual .ActiveTabIndex Value attempted was 2."

That is the correct way to set active tab?

Daniil
Jun 10, 2014, 5:14 AM
Hi @alex303,

Thank you for pointing that problem out. We will investigate what we can do to get .ActiveTabIndex working in such a scenario.

For now, please use the following instead of ActiveTabIndex.

.CustomConfig(cc => cc.Add(new { activeTab = 2 }))

alex303
Jun 10, 2014, 8:21 AM
Hi @alex303,
For now, please use the following instead of ActiveTabIndex.

.CustomConfig(cc => cc.Add(new { activeTab = 2 }))

Thank you.

Daniil
Jun 10, 2014, 2:08 PM
Created an Issue:
https://github.com/extnet/Ext.NET/issues/506

Fixed in the trunk, revision #5867.