Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible that just using groupeditor tab? #254

Open
stantoxt opened this issue Nov 6, 2015 · 2 comments
Open

Is it possible that just using groupeditor tab? #254

stantoxt opened this issue Nov 6, 2015 · 2 comments

Comments

@stantoxt
Copy link

stantoxt commented Nov 6, 2015

Tab is a very common control in development. Sometimes,there are even more than two Grids in one view page , if the tab in BsGroupEditor can be used in BsGrid.

@cristipufu
Copy link
Member

BsGroupEditorTabModel is actually a grid, so you could use that with Html.BsGroupEditorFor() to display tabbed grids.

public class BsEditorTabModel<TRow> : IBsEditorTabModel
{
        public BsGridModel<TRow> Grid { get; set; }
}

You have to make a little hack though, hide the plus button.

.bs-addBtn{
    display: none;
}

printscreen

You need to specify your own view partial for rendering the grid row now:

var tab1 = cfg.For(x => x.Developers)
            .Template(x => x.Grid, "_TabItem")

@stantoxt
Copy link
Author

That's Great.I am trying it these days.I added field templateGrid like template to allow the renderItems() in BsEditorTabRenderer<TModel,TRow> to RenderModel instead of RenderModel,so that I can use BsGridFor for all items in one view caller not one item in the view one time.Yet , the style bsgrid css can not covers bsgroupeditor css.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants