Why does the toolbar not show?

1 Answer 70 Views
Grid
Lisa
Top achievements
Rank 1
Lisa asked on 02 Dec 2021, 04:29 PM

Hello - I have a grid with a toolbar defined.  The grid is also coded to allow grouping.  The grouping option is visible, but not the toolbar.  If I disable grouping, the toolbar displays,  I have other grids coded very much the same in my project that work fine.  

What do I have wrong on this one?

Here is my code:

        <div class="row pt-4 d-none centered" id="qSecurityGridDiv">
            @(Html.Kendo().Grid<WSIPC.Web.Models_View.Security.QmlativSecurityUserList>()
                .Name("grid")
                .Columns(columns => {
                    columns.Bound(p => p.Id).Visible(false);
                    columns.Bound(p => p.UserName).Title("Username");
                    columns.Bound(p => p.LastName).Title("Last Name");
                    columns.Bound(p => p.FirstName).Title("First Name");
                    columns.Bound(p => p.Role).EditorTemplateName("DropDownRoles");
                    columns.Bound(p => p.Grade).Title("Grade Level");
                    columns.Bound(p => p.AssignedSchools).ClientTemplate("#= iterate(data)#").Title("Schools");                    
                    columns.Bound(p => p.Hsb).EditorTemplateName("DropDownIndicators").Title("HSB Access");
                    columns.Bound(p => p.HsbAdmin).EditorTemplateName("DropDownIndicators").Title("HSB Administrator Access");
                    columns.Bound(p => p.MsdAdmin).EditorTemplateName("DropDownIndicators").Title("MSD Administrator Access");
                })
                .ToolBar(toolbar =>
                {
                    toolbar.Save();
                    toolbar.Excel();
                    toolbar.Pdf();
                    toolbar.Custom().Text("Mass Change").HtmlAttributes(new { id = "massChangeQ" });
                })
                .Pdf(pdf => pdf.ProxyURL(Url.Action("Excel_Export_Save", "Grid")).AllPages().FileName("Msd Security Grid"))
                .Excel(excel => excel.ProxyURL(Url.Action("Excel_Export_Save", "Grid")).AllPages(true).FileName("Msd Security Grid"))
                .AutoBind(false)
                .Pageable()
                .Sortable()
                .Scrollable()
                .Groupable()
                .Reorderable(reorder => reorder.Columns(true))
                .Editable(editable => editable.Mode(GridEditMode.InCell))
                .Filterable()
                .HtmlAttributes(new { style = "height:750px;" })
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .Batch(true)
                    .PageSize(100)
                    .Read(read => read.Action("GetSecurityUsersFilteredGrid", "MsdQmlativSecurity").Data("additionalInfo"))
                    .Model(model =>
                    {
                        model.Id(p => p.Id);
                        model.Field(p => p.UserName).Editable(false);
                        model.Field(p => p.LastName).Editable(false);
                        model.Field(p => p.FirstName).Editable(false);
                        model.Field(p => p.Grade).Editable(false);
                        model.Field(p => p.AssignedSchools);
                    })
                    .Update("UpdateSecurityGridGroup", "MsdQmlativSecurity")
                    .Events(e => e.Sync("sync_handler"))
                 )
                .Events(events => events.Edit("onEdit"))
            )
        </div><!-- end grid row-->
     

I've attached screen shots with grouping enabled and with it not.

Thanks for any help.

 

Lisa

1 Answer, 1 is accepted

Sort by
0
Anton Mironov
Telerik team
answered on 07 Dec 2021, 11:05 AM

Hello Lisa,

Thank you for the images, code snippet, and details provided.

As this forum post is a duplicate of a support ticket, I am reposting my answer here for the community as well:

I tried to replicate the pointed behavior locally with version "2021.2.616" and the result is the expected one.

Find attached a sample project that I prepared for the case. It uses the pointed version along with a Groupable Kendo UI Grid and your Toolbar.

Make the needed tests locally with the project attached and let me know if this is the expected behavior.

Could you please double-check for JavaScript errors in the Developer Tools Console when running your application?

Furthermore, the fastest route to getting you up and running is if you could provide a runnable, isolated, sample project. Examining this project will let us replicate the issue locally and further troubleshoot it.

Looking forward to hearing back from you.

 

Kind Regards,
Anton Mironov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Lisa
Top achievements
Rank 1
Answers by
Anton Mironov
Telerik team
Share this question
or