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

Export To Excel with Aggregate

5 Answers 122 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Waldo
Top achievements
Rank 1
Waldo asked on 02 Sep 2015, 08:54 AM

Hi, 

When I'm using the export to excel function it works fine. But once I add an aggregate to the datasource as in one of the demos, I get the error attached.

Is one of my configurations wrong?

Your help will be much appreciated.

Thanks,

Waldo

My Code is as follows: 

 

@helper TreeGrid()
{
    <div>
    @(Html.Kendo().TreeList<OrgStructureViewModel>()
        .Name("treelist")
        .Columns(columns =>
        {
            columns.Add().Field(e => e.Full_Name)
               .FooterTemplate("<strong>#= count # employee(s)</strong>");
            columns.Add().Field(e => e.Emp_No);
            columns.Add().Field(e => e.Man_No).Hidden(true);
            columns.Add().Field(e => e.Division_ID).Template("#= Division #");
            columns.Add().Field(e => e.Title);
            columns.Add().Command(c => { c.Edit(); c.Destroy(); }).Width(220);
        })
        .Toolbar(x => { x.Create();  x.Excel(); x.Pdf(); })
        .Editable(x => x.Mode("popup"))
        .Filterable()
        .ColumnMenu(true)
        .Scrollable(true)
        .Sortable()
        .Resizable(true)
        .Excel(excel => excel
            .FileName("Reporting_Line.xlsx")
            .ProxyURL(Url.Action("Export_Save", "Reporting_Line"))
        )
        .Pdf(pdf => pdf
            .FileName("Reporting_Line.pdf")
            .ProxyURL(Url.Action("Export_Save", "Reporting_Line"))
        )
        .Events(ev => ev.Edit("onEdit"))
        .DataSource(dataSource => dataSource
            .Read(read => read.Action("Reporting_LineRead", "OrgStructure"))
            .Update(update => update.Action("Reporting_LineEdit", "OrgStructure"))
            .Create(create => create.Action("Reporting_LineAdd", "OrgStructure"))
            .Destroy(delete => delete.Action("Reporting_LineDelete", "OrgStructure"))
             .ServerOperation(false)
             .Aggregates(aggr =>
             {
                 aggr.Add(e => e.Full_Name).Count();
             })
            .Model(m =>
            {
                m.Id(f => f.Reporting_Line_ID);
                m.ParentId(f => f.ReportsTo);
                m.Field(f => f.Emp_No);
                m.Field(f => f.Man_No);
                m.Field(f => f.Division_ID);
                m.Expanded(false);
 
            })
        )
    )
}

 

 

<script type="text/javascript">   
    function onEdit(e) {
        console.log(e);
        if (!e.model.isNew()) {
            $("#Emp_No").data("kendoComboBox").enable(false);
        } else {
            $("#Division_ID").data("kendoDropDownList").enable(false);           
        }
    }
 
    function filterEmployees() {
        console.log($("#Emp_No").data("kendoComboBox").value());
        return {
            empNo: $("#Emp_No").data("kendoComboBox").value(),
            text: $("#Man_No").data("kendoComboBox").text()
        };
    }
</script>

 

​

5 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 03 Sep 2015, 11:51 AM

Hello Waldo,

Thank you for reporting the problem, we were not aware of it. I have escalated it to the developers team and it is logged for fixing. As a small sign of gratitude I update your Telerik points.

Regards,
Dimiter Madjarov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Waldo
Top achievements
Rank 1
answered on 18 Sep 2015, 09:09 AM

Hi Dimiter,

Thanks for the points :)

Do you have eta on when it will be fixed? 

Thanks,

Waldo

 

 

0
Alex Gyoshev
Telerik team
answered on 21 Sep 2015, 01:40 PM

Hello Waldo,

I am afraid that we do not have a time frame for the implementation of this functionality at this time.

Regards,
Alex Gyoshev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Waldo
Top achievements
Rank 1
answered on 07 Apr 2016, 11:12 AM

Hi Guys,

Has any progress been made on this? 

Thanks,

Waldo

 

0
Alex Gyoshev
Telerik team
answered on 08 Apr 2016, 04:21 PM

Hello Waldo,

I am afraid not. We have evaluated the required effort and the feature is non-trivial to implement, and is not scheduled for implementation yet. You can submit this as a feature request on UserVoice, so that it can gather votes from other users of the framework.

Regards,
Alex Gyoshev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
TreeList
Asked by
Waldo
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Waldo
Top achievements
Rank 1
Alex Gyoshev
Telerik team
Share this question
or