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

Horizontal Scrolling in Hierarchical Grid

7 Answers 85 Views
GridView
This is a migrated thread and some comments may be shown as answers.
James Craig
Top achievements
Rank 1
James Craig asked on 03 Apr 2010, 01:23 PM
Dear All,

I wish to bind a simple two-level class hierarchy to a GridView: a collection of Story instances (Story defines around 20 properties), each of which has a List<File> property (File defines around 30 properties, one of which is a List<T> - perhaps this collection property is responsible for the problem described below?).  I want to rely on automatic column generation rather than defining columns upfront.

When I bind this hierarchy to the GridView (adding an appropriate PropertyRelation to the ChildRelations colln), the top-level band displays correctly.  However, when I expand a top-level row, two very serious rendering issues materialise in the child grid:

1) An entirely blank and extremely wide extra column - without a heading or data - appears to the right of the child grid.
2) Scrolling horizontally toward this extra column causes the grid to elongate horizontally; eventually it becomes wider than the rendering engine can handle and the whole thing degenerates into a mess.

Disabling Row and Column virtualisaton improves responsiveness, but the above problems remain.  When I bind the same object model to Infragistics' Silverlight grid I have no issues.

This is a tremendous disappointment.  I can't figure out why I can't simply assign my root collection to the ItemsSource property, define a PropertyRelation, then rely on Telerik's grid to generate rows and columns correctly.  Please advise.

Many thanks,

James

7 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 06 Apr 2010, 09:59 AM
Hello James,

By default controls in RowDetailsTemplate and in HierarchyChildTemplate (same as auto-generated hierarchy) will be measured with infinity (exactly the same as standard Silverlight DataGrid) and this is causing the described problem. You can easily avoid this if you handle SizeChanged of the child grid - please check the attached project for reference.

Regards,
Vlad
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
James Craig
Top achievements
Rank 1
answered on 06 Apr 2010, 11:01 AM
Hello Vlad,

Many thanks for your help - it enabled me to resolve the child grid sizing issue completely.  Unforunately, a couple of serious problems remain, as shown by the attached images.

Problem 1:

When I expand rows from top to bottom, an increasing gap opens up between the border of the parent grid and that of its child rows.  After scrolling horizontally, this gap becomes a 'white void' in the display.  The gap is signigicantly larger if rows are instead expanded from bottom to top.

Problem 2:

After expanding the first child row, subsequent rows have include a blank extra column.

Your help in this matter would be immensely appreciated.

Many thanks,

James




0
James Craig
Top achievements
Rank 1
answered on 06 Apr 2010, 11:09 AM
Hello Vlad,

To confirm - the problems outlined above also affect the grid in the sample app you sent me.

Looking forward to your reply.

Many thanks,

James
0
Vlad
Telerik team
answered on 06 Apr 2010, 01:00 PM
Hello James,

Sorry - I've missed this! I've attached modified version of my example - please check it and let me know how it goes.

Kind regards,
Vlad
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
James Craig
Top achievements
Rank 1
answered on 06 Apr 2010, 03:08 PM
Hello Vlad,

Many thanks for your help.  Your alteration has fixed to a large extend the problem of 'gaps' I described earlier.  Unfortunately, other problems remain, as shown in the attached images.  I updated your project to include cell data, and came across the following issues:

  • When a row is expanded *after* horizontal scrolling has been performed , its child row is shown with no data.
  • 'Cell data vanished part 1' shows a second problem.  If you expand row 'A' that has child row 'A1' with a width of say 100, and then you expand row 'B' that has child row 'B1' with a width of say 180 - most of the columns of row B1 are inaccessible.  You're foced to narrow the columns in row B1 so its the same width as A1 in order to see all the data.
  • Least serious problem - child grid cells break out of their grid when horizontal scrolling is performed.

I hope you can help me!

Many thanks,

James

0
Vlad
Telerik team
answered on 06 Apr 2010, 03:54 PM
Hello James,

I've attached another example using a bit different approach - you do not need in this case to handle SizeChanged, etc.

Regards,
Vlad
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
James Craig
Top achievements
Rank 1
answered on 07 Apr 2010, 09:33 AM
Hello Vlad,

That works great!  Many thanks for all your help.

Best regards,

James
Tags
GridView
Asked by
James Craig
Top achievements
Rank 1
Answers by
Vlad
Telerik team
James Craig
Top achievements
Rank 1
Share this question
or