Click here to Skip to main content
14,735,239 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In the Pivot grid (Kendo UI asp.net MVC), I have tried to hide the last column and row but could not succeed (ie. the column and row that shows total field which is default in the grid). I search on google but I didn't get the correct answer.

Can anyone help me to do?

What I have tried:

My Pivot grid

@(Html.Kendo().PivotGrid<xxx>()
                                             .Name("xxxx")
                                             .HtmlAttributes(new { @class = "hidden-on-narrow" })
                                             .Filterable(true)
                                             .Height(600)
                                             .DataCellTemplateId("dataCellTemplate")
                                             .ColumnHeaderTemplateId("headerTemplate")
                                             .RowHeaderTemplateId("rowHeaderTemplate")
                                             .Sortable()
                                             .DataSource(dataSource => dataSource
                                                 .Ajax()
                                                 .Transport(transport => transport.Read("xxx_Read", "xxx"))
                                                 .Schema(schema => schema

                                                     .Cube(cube => cube

                                                         .Dimensions(dimensions =>
                                                         {
                                                             dimensions.Add(model => model.SSName).Caption("SSName");
                                                             dimensions.Add(model => model.SVName).Caption("SVName");

                                                         })

                                                     )

                                                     )
                                                 .Columns(columns =>
                                                 {
                                                     columns.Add("SSName").Expand(true);

                                                 })
                                                 .Rows(rows => rows.Add("SVName").Expand(true))

                                             )
                                            .Events(events =>
                                            {
                                                events.DataBound("xxxx_dataBound");
                                                events.DataBinding("xxxx_dataBinding");

                                            })

)
Posted
Updated 22-Aug-19 12:33pm
Comments
#realJSOP 22-Aug-19 14:16pm
   
Ask on the telerik/progress message board.

1 solution

Set the visibility property on the last column.
Delete the last column.
Keep the column from getting instantiated in the loading event.
Scroll the column out of sight using a freeze or a smaller view port.
Overlay the last column with another control / panel.
Use custom column specifications instead of default.
Define numbers as strings to keep totals from being calculated.
Decrease the width of the column to 0.
Set the foreground and background colors to transparent.
   
Comments
aravindnass 23-Aug-19 0:49am
   
Thanks for the answer...Can you give an example of this?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900