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

Kendo grid MVVM not functioning properly [Collapse , rendering row]

6 Answers 149 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Neeraj
Top achievements
Rank 1
Veteran
Neeraj asked on 05 Feb 2018, 03:57 AM
Hello,
              I have created sample problem in I have used row
  Following :

1) The DataSource is grouped by  PricingPCC Column which collapse. 
2) And want to increase Segment Column tried hardcoded 150-300px that work either.
3) Mismatch in width of table header and row data Row data render below column header properly

6 Answers, 1 is accepted

Sort by
0
Neeraj
Top achievements
Rank 1
Veteran
answered on 05 Feb 2018, 06:45 AM
I found the solution to for # row and column header were not aligned. It was due that grouping header took extra <td> tag, so added 1 extra in my row template.

 Please reply  Grouping column  collapse row.
0
Stefan
Telerik team
answered on 06 Feb 2018, 12:12 PM
Hello, Neeraj,

I'm glad to hear that the issue is resolved.

The grouping the can be done initially via the group property of the dataSource, and the rows can be collapsed using the collapseGroup method of the Grid on the dataBound event:

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/methods/collapsegroup

https://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-group

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/events/databound

I made an MVVM example demonstrating this:

https://dojo.telerik.com/OMEKOB

I hope this is helpful.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Neeraj
Top achievements
Rank 1
Veteran
answered on 08 Feb 2018, 09:40 AM
Hello thanks for  I have used collapse Group method mentioned in my sample  The new link is  grid collapse  not working
0
Stefan
Telerik team
answered on 09 Feb 2018, 11:58 AM
Hello, Neeraj,

Could you please advise which link is not working as all of them a working on my end?

I will be expecting the details and assist further.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Neeraj
Top achievements
Rank 1
Veteran
answered on 12 Feb 2018, 02:30 AM
Hello, try this   I am also attaching video file in .zip to show the problem in my side. Open.htm file to run ( in-video description: On click of arrow in grouping the row  collapse )
0
Georgi
Telerik team
answered on 14 Feb 2018, 07:22 AM
Hello Neeraj,

Thank you for the provided video.

The described behavior is expected since rowTemplate is used and within the template no k-group-cell is defined.

e.g.
#= new Array($("\#TSTGrid").data('kendoGrid').dataSource.group().length + 1).join('<td class="k-group-cell"></td>') #

I have modified the sample from the video and now collapsing and expanding groups works as expected:



Regards,
Georgi
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Neeraj
Top achievements
Rank 1
Veteran
Answers by
Neeraj
Top achievements
Rank 1
Veteran
Stefan
Telerik team
Georgi
Telerik team
Share this question
or