adding datagrid to radbookitem

2 posts, 0 answers
  1. shweta singhal
    shweta singhal avatar
    3 posts
    Member since:
    Mar 2010

    Posted 16 Apr 2010 Link to this post


    I am adding radbookitem to a radbook dynamically. On some of radbookitem i want to add a datagrid. How can I add datagrid to radbookitem.

    Thanks a lot.
  2. Kiril Stanoev
    Kiril Stanoev avatar
    1512 posts

    Posted 19 Apr 2010 Link to this post

    Hi Shweta,

    Yes, you can add a DataGrid to a RadBookItem. RadBookItem is a ContentControl, therefore you can put anything as its content.

    for (int i = 0; i < 10; i++)
        // Create BookItem
        RadBookItem bookItem = new RadBookItem();
        // Create GridView
        RadGridView grid = new RadGridView();
        // Bind the GridView to a collection of items
        grid.ItemsSource = this.GenerateGridViewItemsSource();
        // Pass the GridView as a content to the BookItem
        bookItem.Content = grid;
        // Add the BookItem as an item to the items collection of the Book

    Let me know if this helps. If you have additional questions or comments, let me know. I'd be glad to further assist you.

    Sincerely yours,
    Kiril Stanoev
    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.
Back to Top