GridView with RowDetails and different DataSource

6 posts, 0 answers
  1. Joao Paulo Grassi
    Joao Paulo Grassi avatar
    98 posts
    Member since:
    Feb 2011

    Posted 03 Aug 2011 Link to this post

    Hello!

    I need to implement a scenario on my gridview that is, I have a Row with some basic data, and i need to create a row detail when user click's on a master row. Until here it's ok, i check the examples on the documentation, but what i have doubts is, when the user click's on the master row i need to get the ID of that row and with this ID i need to call a WCF service pass it as parameter and set the GridView Row Details datasource/Context to use the List that return from my service call.

    I never worked with GridView Details Row before so i'm kind of lost, there's any event that get fired before the row detail are loaded?

    Thanks!
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 03 Aug 2011 Link to this post

    Hello Joao Paulo Grassi,

    Please, read all the help articles on Row Details. They describe all the available events and how to get the master row item. You can place a child grid in the row details template and populate it with data on demand. The data will come from your WCF service. 

    Let me know if you have any particular questions, after you have covered the documentation.

    Kind regards,
    Ross
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. DevCraft banner
  4. Joao Paulo Grassi
    Joao Paulo Grassi avatar
    98 posts
    Member since:
    Feb 2011

    Posted 03 Aug 2011 Link to this post

    Hi Ross.

    Thanks for your help, the link that you send is inaccessible, maybe the url is wrong, can you check it please?

  5. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 03 Aug 2011 Link to this post

    Hi Joao Paulo Grassi,

    It seems our admin has messed the link up. 

    Here is the correct link.

    All the best,
    Ross
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  6. Joao Paulo Grassi
    Joao Paulo Grassi avatar
    98 posts
    Member since:
    Feb 2011

    Posted 03 Aug 2011 Link to this post

    Hi again,

    I create a GridView inside my RowDetails DataTemplate, and i use the LoadingRowDetails, to capture when the user click's on a row and the Details is about to show. But The Details GridView is inside of a DataTemplate and i don't have access to it. How do i manage this?
  7. Joao Paulo Grassi
    Joao Paulo Grassi avatar
    98 posts
    Member since:
    Feb 2011

    Posted 03 Aug 2011 Link to this post

    Oh sorry, i think i already manage to do this, i just need to Bind the ItemsSource property of the Details GridView to my ViewModel List and in the LoadingRowDetails event i call my Service and fill the List.

Back to Top
DevCraft banner