Syncfusion PivotView: How to prevent drill down for specific columns?

14 Views Asked by At

I'm working on implementing a PivotView using Syncfusion in my ASP.NET application. I have a requirement where I need to display certain columns without allowing users to drill down into their details. Specifically, I want to display customer names and their corresponding mobile numbers side by side, without drilling down into the mobile numbers.

Here's my current code snippet:

@Html.EJS().PivotView("PivotView").Width("100%").Height("600").BeginDrillThrough("Syncfusion.FormOperations.beginDrillThrough").EnableVirtualization(false).AllowDeferLayoutUpdate(true).EnableValueSorting(true).ShowFieldList(true).ShowToolbar(true).ShowFieldList(true).AllowNumberFormatting(true).AllowConditionalFormatting(true).ExportAllPages(false).MaxNodeLimitInMemberEditor(50).AllowPdfExport(true).AllowCalculatedField(true).DataSourceSettings(dataSourceSettings => dataSourceSettings.DataSource((IEnumerable<object>)Model).ExpandAll(false).EnableSorting(true).ShowGrandTotals(false)
            .SortSettings(sortsettings =>
             {
                 sortsettings.Name("Quarter").Order(Sorting.Ascending).MembersOrder(QuarterArrayToSortQuarter).Add();
             })
          .FormatSettings(formatsettings =>
            {
                formatsettings.Name("GrossWt").Format("N3").Add();
                formatsettings.Name("NetWt").Format("N3").Add();
                formatsettings.Name("rate").Format("N2").Add();
                formatsettings.Name("TotalAmt").Format("N2").Add();
            })
            .Rows(rows =>
            {
                rows.Name("CustomerName").Caption("Customer").ExpandAll(true).Add();
            }).Rows(rows =>
            {
                rows.Name("MobileNumber").Caption("Mobile Number").Add();
            }).Rows(rows =>
            {
                rows.Name("Difference").Caption("Difference").Add();
            })
            .Columns(columns =>
            {
                if (period == "6 Monthly")
                    columns.Name("Semester").Caption("Semester").Add();
                else if (period == "Yearly")
                    columns.Name("fy_year").Caption("FY Year").Add();
            })
            .Values(values =>
            {
                values.Name("TotalAmt").Caption("Total Sales Amount").Add();

            })
             .Filters(filters =>
             {
                 filters.Name("Product_Categories").Caption("Product Categories").Add();
             })).GridSettings(new PivotViewGridSettings { ColumnWidth = 140 }).ShowFieldList(true).AllowDrillThrough(true).

I tried subTotalPosition, but it does not exist for pivotview. So, didn't work.

0

There are 0 best solutions below