2 posts, 0 answers
  1. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 24 Oct 2012 Link to this post


    is there any Example with datasource binding?
    What is possible (xml, sqlite,...)?
    Whats the best way?

    Best Regards
  2. Rosen Vladimirov
    Rosen Vladimirov avatar
    640 posts

    Posted 25 Oct 2012 Link to this post

    Hello Rene,

    The LocalDataSourceProvider is not a dependency object and you can not bind its ItemsSource property. We have developed it this way because we have some concerns using Bindings. Anyway there are several ways to set your ItemsSource:
    •  Use a StaticResource
    •  As in our "FirstLook" example here use your custom reader. This way you can read an XML file and parse it to your RadPivotGrid.
    • Set the ItemsSource directly in the code to any collection (local or created from your database data) that implements IList interface:
    (this.Resources["LocalDataProvider"] as LocalDataSourceProvider).ItemsSource = GeneratePivotData();
    private static IList<Product> GeneratePivotData()
        IList<Product> PivotData = new List<Product>()
           new Product() { Name = "Pen", Price = 10.40, Quantity = 148 },
           new Product() { Name = "Pencil", Price = 10.99, Quantity = 122 },
           new Product() { Name = "Notebook", Price = 11.24, Quantity = 80 },
        return PivotData;

    You may also use XMLA and ADOMD for taking advantage of OLAP data operations.

    I suggest you to take a closer look at our demos here. Don't hesitate to contact us if you have any problems with RadPivotGrid usage.

    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
Back to Top