1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Linking a list control to a details view

Linking a list control to a details view

4 posts, 0 answered
  1. Shane
    Shane avatar
    28 posts
    Registered:
    27 Jul 2008
    13 Aug 2008
    Link to this post
    Hi,

    I have implemented a new custom module and I am implementing 2 public controls. One for display a list of content. The other to show more details about just one record.

    My question is how do you link the two controls together. I know you can have properties to specify the links for each page the control is part of. But how do you determine what record to display for the details control?

    I know it is done for the ContentView based controls? This is how our started (Products example). But I require more flexiblity that the standard ContentView control provide. How does the ContentView control do this?

    Thanks,

    Shane


  2. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    13 Aug 2008
    Link to this post
    Hello Shane,

    We use URL rewriting, which means that based on the URL we pass some query strings to the other pages, which are not visible in the URL. Obviously, if query strings are not an issue, you can pass query strings directly without implementing URL rewritting.

    However, ContentView control has been primarily developed as a base control to be extended and modified by other more concrete implementations. Perhaps if you tell me your scenario I could help you achieve it with the ContentView control which will save you a lot of time and headaches (BlogPosts, Events View, News View, for example, are all based on ContentView control).

    I hope you'll find this information helpful. Let us know if there is anything else we can do for you.

    Greetings,
    Ivan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Shane
    Shane avatar
    28 posts
    Registered:
    27 Jul 2008
    13 Aug 2008
    Link to this post
    Morning,

    I started using your contenview control initially when developing a vacancy module based on a the generic content module.

    I got the Content View to work as you mentioned previously.

    My requirements requires users to be able to sort by columns etc. So I wanted to use the grid view control or something similar?

    Of course if I remove the repeater control the control throws an exception because it can't find the control that is expected to be their?

    Can I get around this problem using the ContentView approach? I was told that I would need to create my own controls in another thread?

    Passing the guid between pages would be ok in this piece of work. But it would be even better if I could work like the other modules using the url rewrite functionality?

    Thanks,

    Shane
  4. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    18 Aug 2008
    Link to this post
    Hi Shane,

    If sorting is all you need from this public control, I still think that the simplest way would be using ContentView. When using the Repeater control, you can set the repeater to look like a table (grid). In the header of this table put LinkButtons which will be used for sorting. Then, from your overridden control you can handle the click events of these buttons and set the SortExpression property of ContentView control accordingly.

    I hope you'll find this information helpful. Let us know if there is anything else we can do for you.

    Best wishes,
    Ivan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered