Customize GridView Paging panel

9 posts, 1 answers
  1. British
    British avatar
    12 posts
    Member since:
    Jul 2014

    Posted 06 Mar 2016 Link to this post

    hi

    i use paging in my winform grid view.everytrhing is ok.

    but i wanna customize the panel paging. for example disable ShowFastBackButton and ShowFastForwardButton in panel paging.

    in this page it said that :

    There are a number of properties, which allow you to customize the paging panel to your specific needs. You can access these properties through the RadGridView.GridViewElement.PagingPanelElement.

    i want change these properties in design time not by code, but i cant find any of these properties in property grid or in property builder.

    i have another question and that is about TextBoxStripElement in paging panel. iwant localize that and put my text intead of page and of in TextBoxStripElement.

    is there any solution for these two question?

    Best Regard

     

  2. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3707 posts

    Posted 08 Mar 2016 Link to this post

    Hello ,

    Thank you for writing.

    You can access the RadGridView.GridViewElement.PagingPanelElement only programmatically. It is not possible to customize which button elements to be displayed at design time.

    As to the question about localizing the TextBoxStripElement, feel free to use the RadGridLocalizationProvider and specify the RadGridStringId.PagingPanelPagesLabel and RadGridStringId.PagingPanelOfPagesLabel texts. Additional information is available here: http://docs.telerik.com/devtools/winforms/gridview/localization/localization

    I hope this information helps. Should you have further questions I would be glad to help.
     
    Regards,
    Dess
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. British
    British avatar
    12 posts
    Member since:
    Jul 2014

    Posted 08 Mar 2016 Link to this post

    Hi

    Thanks for reply.

    in did all you said and work fine.

    but here i have question:

    page number text box content in StripElementTextBox is align to left but i wanna align to middle center

    i try the code below but not worked:

    1.MyGridView.GridViewElement.PagingPanelElement.PageNumberTextBox.TextAlignment = ContentAlignment.MiddleCenter;

    thanks in advanced
  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3707 posts

    Posted 08 Mar 2016 Link to this post

    Hello ,

    Thank you for writing back. 

    In order to center the text of the PageNumberTextBox, you can use the following code snippet:
    this.radGridView1.GridViewElement.PagingPanelElement.PageNumberTextBox.TextBoxElement.TextAlign = HorizontalAlignment.Center;

    I hope this information helps. If you have any additional questions, please let me know.

    Regards,
    Dess
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Aseman
    Aseman avatar
    38 posts
    Member since:
    Aug 2019

    Posted 15 Dec 2019 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Hi Dear Dess

    I`d like to change the number button Count Manually By assign  value in its property but I couldn`t .Do you know Why ?

    RadGridView.GridViewElement.PagingPanelElement.NumericButtonsCount=5;

    it Doesn`t Work unfortunately!

  6. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3707 posts

    Posted 16 Dec 2019 Link to this post

    Hello, Aseman,    

    The NumericButtonsCount property controls how many buttons for navigation to concrete pages there are on the panel.

    NumericButtonsCount = 3:

    NumericButtonsCount 5:

    Note that considering the total records in your DataSource and the specified PageSize you have to be careful what value you set in the NumericButtonsCount. For example, if you have 100 records in the applied DataSource and the PageSize is 20, it is expected to have 5 as NumericButtonsCount.

    If you are still experiencing any further difficulties, please give us some more details about the exact requirement that you are trying to achieve. Thus, we would be able to get better understanding of the precise case and assist you further. Thank you in advance.

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    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.
  7. Aseman
    Aseman avatar
    38 posts
    Member since:
    Aug 2019

    Posted 16 Dec 2019 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Hello 

    As I said In another Post ,

    I wrote Custom Pagination (Server Side Paging) on Win Form By use of Linq to Sql`(Because Of 2 Million Records ) relatively successful. so I`m loading  20 (Page Size) Records for every page in my Data source
    .it means I don`t use a data source with 2 million records in Back of the Form .

    Question:

    1- I can Not set the numeric button Count On Loading. why?
    RadGridView.GridViewElement.PagingPanelElement.NumericButtonsCount=5; <it doesn`t Work>
    I have just One button in numeric button Count Controls 

     

    2- can I have event for numeric button in paging panel element in grid view in win Form ?

  8. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3707 posts

    Posted 17 Dec 2019 Link to this post

    Hello, Aseman,     

    If you have your custom implementation for paging, note that the built-in paging panel actually takes into consideration the total number of rows in the RadGridView.Rows collection. If you have a DataSource collection that stores only the records for the current page, it is normal that only one button will be displayed. In order to obtain more page number buttons, feel free to reduce the page size and thus if you have 20 records in the DataSource and the page size is 5, you are expected to obtain 4 pages and 4 page number buttons respectively.

    However, I would like to suggest you using RadVirtualGrid. It is a grid component developed on top of Telerik Presentation Framework which provides a convenient way to implement your own data management operations and optimizes the performance when interacting with large amounts of data. It also supports paging and the data is loaded on demand with firing the CellValueNeeded event. Additional information is available in the online documentation: https://docs.telerik.com/devtools/winforms/controls/virtualgrid/overview.html 

    I hope this information helps. 

     

    Regards,
    Dess | Tech Support Engineer, Sr.
    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.
  9. Aseman
    Aseman avatar
    38 posts
    Member since:
    Aug 2019

    Posted 17 Dec 2019 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Thank you for helping me improve.

    As You said in Server Side Paging ,I can not Set 

    RadGridView.GridViewElement.PagingPanelElement.NumericButtonsCount

    More than 1.

    Thank you So Much Again

Back to Top