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

[Solved] Grid inside TabStrip

2 Answers 189 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
MrSena
Top achievements
Rank 1
MrSena asked on 22 Dec 2011, 08:13 PM
I have a Grid inside TabStrip.
When I try to refresh the data in the grid, then lost all the styles. 
Demo project in attach.

What am I doing wrong?

2 Answers, 1 is accepted

Sort by
0
MrSena
Top achievements
Rank 1
answered on 25 Dec 2011, 07:47 PM
@(Html.Telerik().TabStrip()
    .Name("DemoTabStrip")
    .Items(tab =>
        {
            tab.Add()
                .Text("Tab1")
                .LoadContentFrom("Index", "Tab1");
            tab.Add()
                .Text("Tab2")
                .LoadContentFrom("Index", "Tab2");
            tab.Add()
                .Text("Tab3")
                .LoadContentFrom("Index", "Tab3");
            tab.Add()
                .Text("AlterTab1")
                .Content(
                    @<text>
                        @Html.Partial("AlterTab1")
                    </text>
                );
                 
        })
    .SelectedIndex(0)
)

Grid View
@(Html.Telerik().Grid<TelerikMvcTestApplication.Models.DemoModel>()
    .Name("tempGrid")
    .DataBinding(dataBinding =>
    {
        dataBinding.Ajax().Select("Items", "Tab1").Enabled(true);
    })
    .Columns(columns =>
        {
            columns.Bound(o => o.Name);
            columns.Bound(o => o.BoolData);
            columns.Bound(o => o.IntData);
            columns.Bound(o => o.Name);
            columns.Bound(o => o.Note);
        })
    .Scrollable()
    .Sortable()
    .Pageable()
    .Filterable()
    .Groupable()
    .Footer(true)
)

I realized that the problem is that the tabstrip Ajax loads the data, and then the grid can not load with Ajax.
What I can doing for resolve this problem?
Current version off demo project in attach.
0
MrSena
Top achievements
Rank 1
answered on 25 Dec 2011, 08:30 PM
it works
for each Grid, you must specify a different name!
Tags
Grid
Asked by
MrSena
Top achievements
Rank 1
Answers by
MrSena
Top achievements
Rank 1
Share this question
or