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

How to have an infinite horizontal scrolling?

2 Answers 670 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Bahram
Top achievements
Rank 1
Bahram asked on 09 Oct 2019, 02:11 AM

Hi there,

 

I have a requirement which is implementing a horizontally infinite scrolling on a GridView. Basically, I want to be able to add new columns to my GridView and see them as I am end of scrolling(either side). I know how to add and bind new columns to my GridView at run-time, but I don't know if there is any event or trick that I can use to detect if I am end of scrolling or not(so I can add new columns...).

Can someone please help me with this?

 

 

Thanks,

Bahram Afsharipoor

2 Answers, 1 is accepted

Sort by
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 11 Oct 2019, 11:44 AM

Hi Bahram,

What you can try is to get the ScrollViewer inside the RadGridView and subscribe to its ScrollChanged event. Inside the event handler, you can check if the ScrollableWidth of the ScrollViewer is equal to the e.HorizontalOffset property from the event arguments. If yes you can add a column to the RadGridView. To get the ScrollViewer you can use our ChildrenOfType<T>() extension method. 

I have prepared a sample project which demonstrates this approach.

Regards,
Dinko
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.
0
Bahram
Top achievements
Rank 1
answered on 23 Oct 2019, 09:21 PM

Hi Dinko,

 

That's exactly what I needed, I appreciate your help!

 

 

Thanks,

Bahram Afsharipoor

Tags
GridView
Asked by
Bahram
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Bahram
Top achievements
Rank 1
Share this question
or