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

How to load 366 columns at once in a GridView ?

3 Answers 42 Views
GridView
This is a migrated thread and some comments may be shown as answers.
JIG
Top achievements
Rank 1
JIG asked on 19 Aug 2016, 06:26 AM

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 :)

3 Answers, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 19 Aug 2016, 08:51 AM
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.
0
JIG
Top achievements
Rank 1
answered on 22 Aug 2016, 09:23 AM

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 :)

0
Stefan Nenchev
Telerik team
answered on 24 Aug 2016, 09:55 AM
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.
Tags
GridView
Asked by
JIG
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
JIG
Top achievements
Rank 1
Share this question
or