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

Expand / Collapse Rows in Grid View based on Parent Child Relationship

1 Answer 367 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 28 Jan 2019, 01:13 PM

we need to expand the rows based on some condition we have(based on a flag we set). we have tried expanding the rows in both CellFormatting event and ViewCellFormatting event.but it expands only the groups which are in visible. the groups which will be pulled on scrolling the grid are not expanded. please suggest us to fix this issue as it is very high priority for us.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 29 Jan 2019, 09:53 AM
Hello, Ken,      

Note that the CellFormatting/ViewCellFormatting events are purposed to style the cells that are displayed in the grid. Due to the UI virtualization in RadGridView, cell elements are created only for currently visible cells and are being reused during operations like scrolling, filtering, grouping and so on. Hence, the CellFormatting/ViewCellFormatting events are fired only for the visible cells.

I can suggest you to expand the desired rows after you populate the grid with data. Then, you can iterate the RadGridView.Rows collection which stores the data rows and set the IsExpanded property to the desired value.

However, if you are still experiencing any further difficulties, it would be greatly appreciated if you can give us some more details about the exact scenario that you have and the specific requirement that you are trying to accomplish. Thus, we would get better understanding of the precise case and think about a suitable solution.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Ken
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or