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

Grid Pager of input type is not validated

1 Answer 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pawel
Top achievements
Rank 1
Pawel asked on 03 Oct 2019, 09:08 AM

Hello,

Current behavior

 

In grid, when I use the paginator as an input it allows the user to type whatever they want in the field, meaning, it accepts

- numbers higher than available page count

- any alphabetical letters

 

Expected behavior:

- The input ignores the letters and when the number higher than total page count is typed (or coppied / dragged into) the value is set as the maximum page number

 

Code:

(in grid)

                <kendo-pager-prev-buttons></kendo-pager-prev-buttons>
                <kendo-pager-input></kendo-pager-input>
                <kendo-pager-next-buttons></kendo-pager-next-buttons>

 

Thanks for any help,

Pawel

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 07 Oct 2019, 08:38 AM

Hi Pawel,

Indeed, the default Pager page size Input UI is a regular Input/textbox that accepts non-numeric values.

We agree that replacing it with a numeric input (or a Kendo NumericTextBox) would yield a more expected behavior and a better UX overall. This is why I logged an enhancement item to our GitHub repository that you can track here:

https://github.com/telerik/kendo-angular/issues/2515

Meanwhile you can replace the kendo-pager-input in the Grid Pager Template with a NumericTextBox with min/max restrictions  changes the Grid skip property accordingly when the value is changed, e.g.:

https://stackblitz.com/edit/angular-py7vuo?file=app/app.component.ts

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik

Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Pawel
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or