How to load 366 columns at once in a GridView ?

4 posts, 0 answers
  1. CreoniX
    CreoniX avatar
    28 posts
    Member since:
    Sep 2009

    Posted 19 Aug Link to this post

    Hi all,

    I am working on a WPF application using Telerik and coded in C# .NET.
    My following question is over a WPF page using the “Code behind” model to implement the logic of the page.

    Currently, I have a <telerik:RadGridView> for which the source is the DefaultView of a DataTable containing 365 columns (or 366, it depends on the number of days in a year).

    But I am facing an issue :

    The source of the RadGridView is a 365/6 columns DataTable (DefaultView).

    It does not seem that all the columns are loaded at the begining.
    I mean that I have to scroll 3 times to the end of the scrollbar to make all the 365/6 columns appear . => This could be another issue, but it is my opinion.
    I would like to know how to load all that columns at once ?

    Any help or tip will be much appreciated :)

  2. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    280 posts

    Posted 19 Aug Link to this post

    Hi Marnix,

    Please clarify what exactly you mean by saying that not all columns are loaded in the RadGridView.

    Generally, the RadGridView uses a UI Virtualization mechanism for performance boost which means that the visual elements(cells and rows) are recycled and reused for the different items within the control. 
    The columns are basically loaded, but their content is visualized once you bring them into view. You can set the "EnableColumnVirtualization" property of RadGridView to "False" so that all content is loaded at the beginning, but we strongly advise against such action as the performance will be seriously affected, especially in your case where lots of columns are used.
     
    Can you share more details on your setup and the exact requirements you have so I can advise you more appropriately? 

    Regards,
    Stefan Nenchev
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. CreoniX
    CreoniX avatar
    28 posts
    Member since:
    Sep 2009

    Posted 22 Aug Link to this post

    Hi,

    My point is to create a RadGridView with columns aligned with the columns of a GanttView. (please find example in attachment)

    I only need to show some information in the RadGridView => do not need of a RadScheduleView.

    So my question is : How could I get the GanttView columns number and their width ? That information will be applied to the RadGridView design.

     

    Looking forward to your answer :)

  5. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    280 posts

    Posted 24 Aug Link to this post

    Hi,

    Please check the following article from our documentation - Configuring the TimeRuler - where you can find information on how to spread the columns within the RadGanttView control. You can combine it with modifying the ColumnWidth of the RadGridView. There is also a Pixels to PixelLength Conversion example in our SDK Samples Browser which might be useful in your scenario.

    Regards,
    Stefan Nenchev
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top