Unable to add comma in Kendo UI Grid Pagination values

5 posts, 1 answers
  1. Asad
    Asad avatar
    15 posts
    Member since:
    Nov 2019

    Posted 24 Feb 2020 Link to this post

    Hello Every one,

    I am using Kendo ui grid in .net core. I have facing one issue in this grid to add comma in paging value. Please review my attached file and let know what is the better solution for adding comma in paging value? Please help me and share code

    thanks

     

     

  2. Answer
    Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    1230 posts

    Posted 27 Feb 2020 Link to this post

    Hi Asad,

    In order to display a comma for the page numbers, I would suggest you to inject that content with JavaScript to the page number link. To do that you could handle the DataBound event of the Grid:

    function onDataBound(e) {
      var grid = e.sender;
      var gridElement = grid.element;
      
      setTimeout(function() {
        var pages = gridElement.find('.k-grid-pager .k-pager-numbers .k-link');
        pages.each(function(i,page){
          var text = $(page).text();
          if(text.indexOf(',')) {
          	$(page).text(text + ',');
          }
        })
      });
    },

    Here you could find a Dojo sample implementing the above suggestion:

    https://dojo.telerik.com/olOGiwoQ

    Even if the above implements the jQuery version of the Grid, the approach in .Net Core will be the same.

    Regards,
    Veselin Tsvetanov
    Progress Telerik

    Get quickly onboarded and successful with Telerik UI for ASP.NET Core with the dedicated Virtual Classroom technical training, available to all active customers.
  3. Asad
    Asad avatar
    15 posts
    Member since:
    Nov 2019

    Posted 27 Feb 2020 Link to this post

    Hi Veselin,

    It's working fine.

    Thank you

  4. Asad
    Asad avatar
    15 posts
    Member since:
    Nov 2019

    Posted 27 Feb 2020 Link to this post

    Hi Veselin,

    We have face another issue in Pie chart. Can you please help me ASAP

    https://www.telerik.com/forums/pi-chart-issue-unable-to-show-default-pie-chart?_ga=2.185295403.340598078.1582787542-244125054.1581491271

  5. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    1230 posts

    Posted 27 Feb 2020 Link to this post

    Hello Asad,

    We are aware of the other forum thread that you have opened on the Chart widget. Your question will be handled in the most appropriate manner in the other thread. Please, do not cross-post between different threads with different topics. That is needed in order to keep each thread focused.

    Regards,
    Veselin Tsvetanov
    Progress Telerik

    Get quickly onboarded and successful with Telerik UI for ASP.NET Core with the dedicated Virtual Classroom technical training, available to all active customers.
Back to Top