Try Now
More in this section

Forums / Developing with Sitefinity / Filter Data In Custom Module's External Widget Template

Filter Data In Custom Module's External Widget Template

3 posts, 0 answered
  1. Axe
    Axe avatar
    16 posts
    11 Feb 2007
    28 Apr 2012
    Link to this post
    I have a custom module built using module builder (Sitefinity 5). I then followed Josh Morales' post on 'Mapping External Templates for Sitefinity 4 Widgets' using Option 2. This works fine.

    I need to be able to pass parameters through url to filter the data that gets displayed. 
    I need to grab the url and get the bits I need... I can use conventional methods such as query strings unless someone has a better alternative that's built into Sitefinity. Then I need to apply this to the datasource. I thought I could use some event on the RadListView to filter the data but when I add a filter expression I get an error:
    Invalid property or field - 'Name' for type: DynamicContent
    Not sure if filtering on the ListView is the best way to start with but any way will do for the moment. 

    I then found a post Getting Event Filters in Code which Ivan gave a response but not sure how to implement in this scenario. How can I get MasterViewDefinition in user control and InitializeControls of course does not exist as it's a user control. I tried inheriting from both SimpleView and ContentView but still can't find what is suggested in that forum post.

    Any suggestions?
  2. Michael
    Michael avatar
    9 posts
    25 Jul 2011
    05 Jun 2013
    Link to this post
    Does anyone have an answer for this? I'm on 5.4.4010.0
  3. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    26 Oct 2016
    10 Jun 2013
    Link to this post
    Hi Michael,

    To manipulate data before they are bound to the list view you could subscribe to the ItemDataBound event.

    Stefani Tacheva
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
3 posts, 0 answered