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

Rows number with virtual scrolling

5 Answers 437 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 26 Jun 2017, 12:58 PM

How to add rows numbers when virtual scrolling is enabled?

using this method: http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Templates/add-row-numbers doesn't work well.

5 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 28 Jun 2017, 08:00 AM
Hello Daniel,

I tested the sample in the virtual scrolling example and it seems to be working as expected on my end. Give the dojo below a try and let me know how it works for you.



Regards,
Viktor Tachev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Dintakurti
Top achievements
Rank 1
answered on 04 Aug 2017, 10:46 AM

Hi Viktor Tachev,

    The dojo link what you provided is not working. If we scroll down the page size is repeating so serial number is repeating.

0
Viktor Tachev
Telerik team
answered on 08 Aug 2017, 08:31 AM
Hello,

The row numbers are displayed as expected and are not repeating on my end. I made a short video showing the behavior I am observing. Please check it out and let me know if I am missing something.



Regards,
Viktor Tachev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Behnam
Top achievements
Rank 1
answered on 04 Feb 2021, 06:54 AM

Hello Viktor,

The initial example you provided do not show the problem clearly. please go to link below and you can see that the row number 5 will not be shown and that is simply because the row number rendered incorrectly to 6 instead of 5.

http://dojo.telerik.com/ASINevIw/2

 

best regards,

Behnam

0
Anton Mironov
Telerik team
answered on 05 Feb 2021, 02:19 PM

Hi Behnam,

Thank you for the example provided.

My name is Anton and I will try my best to assist with resolving the pointed issue, during the absence of my colleague Viktor.

In order to achieve the desired behavior, I made changes to the calculation of the record column as follows:

// In the template of the column:
            columns: [
              {
                title: "#",
                template: "#= record++ #",
                width: 80
              },
// In the dataBinding Event handler:
            dataBinding: function(e) { 
              record = (this.dataSource.page()-1) * this.dataSource.pageSize()+1;
            }
The complete implementation could be found in the following dojo example:

Give the approach above a try and let me know if further assistance is needed.

 

Kind Regards,
Anton Mironov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Dintakurti
Top achievements
Rank 1
Behnam
Top achievements
Rank 1
Anton Mironov
Telerik team
Share this question
or