PivotTable.DataSource in C#

H

Hamidreza_Buddy

hi
I wanted to add a PivotTable to My Form.
i added the one in OWC11. I have a DataTable but i do not know how t
make the pivotTable display this Table. I did this:
myPivot.DataSource = myTable;
but it says it cant convert a DataTable to mssrc.DataSource
 
A

Alvin Bruney [MVP]

you need to cast it to a mssrc.DataSource. From the black book, p 152
..DataSource = (msdatasrc.DataSource)(ojbect)Datatable
The double cast is required since there are no default convertors

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top