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

Excel Export Symbol Bootstrap Theme

1 Answer 156 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Oliver
Top achievements
Rank 1
Oliver asked on 15 Dec 2014, 03:27 PM
Hi,

i am using the excel export feature, but in the toolbar the wrong icon is displayed.

Is this a bug, or do I have to use an extra css file?

regards


@(Html.Kendo().Grid<NursingHomeStock.Models.ResidentViewModel>()
    .Name("AvailablePlaceTypesGrid")
    .Columns(columns =>
    {
        columns.Bound(rvm => rvm.FirstName).Filterable(f => f.Extra(false).Operators(o => o.ForString(fs => fs.Clear().Contains(GlobalResources.Contains))));
        columns.Bound(rvm => rvm.LastName).Filterable(f => f.Extra(false).Operators(o => o.ForString(fs => fs.Clear().Contains(GlobalResources.Contains))));
        columns.Bound(rvm => rvm.Sex)
            .ClientTemplate("#if (Sex == 1) { #" + GlobalResources.Male +
                "#} else if (Sex == 2) { #" + GlobalResources.Female +
                "# } #")
            .EditorTemplateName("DropDownListSex").Filterable(f => f.Extra(false).Operators(o => o.ForString(fs => fs.Clear().Contains(GlobalResources.Contains))));
        columns.Bound(rvm => rvm.BirthDate).Format("{0:dd.MM.yyyy}").EditorTemplateName("Date").Filterable(f => f.Extra(false));
        columns.Bound(rvm => rvm.SocialSecurityNumber).Filterable(f => f.Extra(false).Operators(o => o.ForString(fs => fs.Clear().Contains(GlobalResources.Contains))));
        columns.Bound(rvm => rvm.Comment).Filterable(f => f.Extra(false).Operators(o => o.ForString(fs => fs.Clear().Contains(GlobalResources.Contains))));
        columns.Command(command => command.Destroy().Text(GlobalResources.Delete));
    })
    .ToolBar(toolbar =>
    {
        toolbar.Create().Text(GlobalResources.Create);
        toolbar.Save().CancelText(GlobalResources.Cancel).SaveText(GlobalResources.Save);
        toolbar.Excel().Text(GlobalResources.ExcelExport);
    })
    .Editable(editable => editable.Mode(GridEditMode.InCell))
    .Pageable(pageable => pageable
        .Refresh(true)
        .PageSizes(new []{ 5, 10, 20, 50, 100})
        .ButtonCount(5))
    // TODO: set default filter operator to [contains]
    .Filterable()
    .Navigatable() // Tabulator Support
    .Sortable()
    .ClientDetailTemplateId("ResidenceGrid")
    .DataSource(dataSource => dataSource
        .Ajax()
        .Batch(true)
        .Events(events => events
            .Error("App.errorHandler")
        )
        .Model(model =>
        {
            model.Id(e => e.Id);
            model.Field(e => e.Id).DefaultValue(Guid.NewGuid());
        })
        .Sort(sort => sort.Add("LastName").Ascending())
        .Read(read => read.Action("ReadResident", "Resident", new { ViewBag.nursingHomeId }))
        .Update(update => update.Action("UpdateResident", "Resident"))
        .Create(create => create.Action("CreateResident", "Resident", new { ViewBag.nursingHomeId }))
        .Destroy(destroy => destroy.Action("DestroyResident", "Resident"))
    )
    .Events(events => events.DataBound("App.Resident.dataBoundResidenceGrid"))
)

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 16 Dec 2014, 02:18 PM
Hello Oliver,


This was an issue in the Q3 2014 release, that is already fixed in the latest internal builds i.e. the wrong CSS icon class is added to the Excel export button in the MVC Grid. As a quick fix, you could add the correct class on document ready.
E.g.
$(".k-excel").addClass("k-i-excel");

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Oliver
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or