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

Constantly scrolling grid with fixed visible rows

5 Answers 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 09 Aug 2012, 06:40 PM

I am using the RadGridView to display system events. As new events are observed they are added to the grid's data context. After the data context grows to a particular number of items the oldest items begin to be removed as new items are added. This creates a constantly scrolling view of the items after it reaches maximum size. The number of events occurring in the system make this view unreadable. To correct this problem the visible rows of the grid should be fixed if the scroll bar is not at position zero. Any suggestion on how I could accomplish this would be appreciated.

Thanks,

Matt

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 10 Aug 2012, 06:09 AM
Hello,

 Maybe you can use ScrollIntoView/ScrollIntoViewAsync to make sure desired data item is in view. 

Greetings,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Matthew
Top achievements
Rank 1
answered on 10 Aug 2012, 03:34 PM

I have looked into ScrollIntoView/ScrollIntoViewAsync however I cannot identify a good way to determine which item to use as an argument. Does functionality exist to identify which rows are visible or the scroll index? 

In addition should this call be prompted by an event on the data context or the grid?

Thanks,

Matt

0
Vlad
Telerik team
answered on 15 Aug 2012, 01:02 PM
Hi,

 I've tried to replicate your scenario and indeed it is very hard to know which item you should force into view since the item can be removed. Maybe it will be better in your case to avoid scrolling at all and use for example paging instead (I've attached small demo project demonstrating this). 

Kind regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Matthew
Top achievements
Rank 1
answered on 16 Aug 2012, 07:53 PM
It is preferred to not page the grid. Would it be possible/advisable to create a new grid control template that has this functionality?
0
Vlad
Telerik team
answered on 17 Aug 2012, 05:59 AM
Hello,

 I'm afraid changing control template will not help in this case. This is just the behavior of the standard ScrollViewer (you can try other standard WPF components) when the extent height is changing rapidly. 

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

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