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

Cross Tab

11 Answers 302 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ganeshram
Top achievements
Rank 1
Ganeshram asked on 15 Mar 2008, 01:38 PM
Support,
I'm trying to acheive cross tab results using RadGridview.Please let me know whether this is acheivable using RadGridView.Appreciate if you can provide me a sample.

Actual data
Basicpay           TotalCash        Percentil
10000                20000                10
20000                30000                20
30000                70000                50
50000                80000                90

Cross Tab Result
                        10        20        50        90
Basic Pay        1000    2000    3000    4000
Total Cash       3000    4000    5000    6000


Thanks in advance.

-Cheers
G

11 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 17 Mar 2008, 03:12 PM
Hi Ganeshram,

Thank you for writing.

Currently, the RadGridView for WinForms does not support the "CrossTab" transformation. However, you can manually do that by transforming your dataset and binding the grid to a new table. For example, please review the function provided below:

public DataTable ConvertToCrossTab(DataTable table)  
{  
    DataTable newTable = new DataTable();  
 
    for (int r = 0; r <= table.Rows.Count; r++)  
    {  
        newTable.Columns.Add(r.ToString());  
    }  
 
    for (int c = 0; c < table.Columns.Count; c++)  
    {  
        DataRow row = newTable.NewRow();  
        object[] rowValues = new object[table.Rows.Count + 1];  
 
        rowValues[0] = table.Columns[c].Caption;  
 
        for (int r = 1; r <= table.Rows.Count; r++)  
        {  
            rowValues[r] = table.Rows[r-1][c].ToString();     
        }  
 
        row.ItemArray = rowValues;  
        newTable.Rows.Add(row);  
    }  
 
    return newTable;  

You should consider that the RadGridView is optimized to show a large number of rows, not columns. So if you transform table with a lot of rows (resulting in a dataset with a lot of columns) you could expect some performance decrease when showing it in a RadGridView.

I hope this was helpful. Do not hesitate to contact me if you have other questions.

All the best,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ganeshram
Top achievements
Rank 1
answered on 30 Mar 2008, 10:35 AM
Thanks man.That helps..I'm worried abt the peformance.Can this be acheived...through telerik reports..I just bought the report packages from you.Curious this can be acheived through reports.

I can't see any similar sample on reports.
0
Svetoslav
Telerik team
answered on 31 Mar 2008, 04:33 PM
Hi Ganeshram,

Thank you for getting back to me.

Currently, Telerik Reporting does not offer pivot/cross-tabular functionality. It will be available in Q3 2008, and even earlier if our schedule permits.

If you have any additional questions, please contact me.

Kind regards,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
joshuarivers
Top achievements
Rank 2
answered on 08 Jan 2009, 03:24 AM
Was this feature ever completed? I don't see it documented in the Q3-08 version.
0
Steve
Telerik team
answered on 08 Jan 2009, 01:49 PM
Hello joshuarivers,

Due to much needed optimization of the rendering mechanism of Telerik Reporting and other urgent tasks, the crosstab/table item functionality has been postponed for Q1 2009 and our developers are currently working on it. Q1 is scheduled for the end of February.

Please excuse us for the inconvenience.

Kind regards,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
joshuarivers
Top achievements
Rank 2
answered on 08 Jan 2009, 10:05 PM
I got confused since this was the Winforms forum. Is there a plan for Crosstab on Gridview?

I think it might be really valuable to have a generic control (a datasource?) to provide this functionality. There are a number of places where I'd find it useful to just declaratively bind to my data, but sideways. I already see a bunch of controls in your toolbox that would be better for the option.

It's an idea.

ps. For the other people who might search on this, some do-it-by-hand options:
http://stackoverflow.com/questions/320895/using-linq-to-create-crosstab-results
http://stackoverflow.com/questions/167304/is-it-possible-to-pivot-data-using-linq
0
Martin Vasilev
Telerik team
answered on 09 Jan 2009, 05:22 PM
Hi joshuarivers,

Thank you for the question.

We do have plans to implement CrossTab functionality. Unfortunately, I cannot give you a time frame now, because we have a hard schedule and should consider including this implementation.
Nevertheless we will very much appreciate your feedback on what would you expect from it.

Do not hesitate to contact me again, if you have other questions.

Sincerely yours,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
AM
Top achievements
Rank 1
answered on 17 Mar 2010, 07:32 PM
Is this feature available in Q1 2010?
0
Martin Vasilev
Telerik team
answered on 22 Mar 2010, 05:27 PM
Hello Akhila Mathews,

Thank you for the question.

CrossTab is not included in the latest Q1 2010 release. Before introducing this feature, we have plans to implement column virtualization in the next release Q2 2010. This will allow us to develop CrossTab in the future.

Let me know if you have any other questions 

Best wishes,
Martin Vasilev
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Vasanth
Top achievements
Rank 1
answered on 05 Jun 2012, 03:12 PM
Hi,
    Is the feature available now? I need crosstab grid with row level and column level grouping.  Please advice, Thanks
0
Nikolay
Telerik team
answered on 06 Jun 2012, 04:32 PM
Hi Vasanth,

Currently, our WinForms suite does not offer a PivotGrid. However, I am glad to inform you that we have plans to introduce such a control soon. Still, at this time I am not able to tell you in which release exactly.

Greetings,
Nikolay
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
GridView
Asked by
Ganeshram
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Ganeshram
Top achievements
Rank 1
Svetoslav
Telerik team
joshuarivers
Top achievements
Rank 2
Steve
Telerik team
AM
Top achievements
Rank 1
Vasanth
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or