Filter Data In Custom Module's External Widget Template

Posted by Community Admin on 04-Aug-2018 08:52

Filter Data In Custom Module's External Widget Template

All Replies

Posted by Community Admin on 28-Apr-2012 00:00

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?

Posted by Community Admin on 05-Jun-2013 00:00

Does anyone have an answer for this? I'm on 5.4.4010.0

Posted by Community Admin on 10-Jun-2013 00:00

Hi Michael,

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

Regards,
Stefani Tacheva
Telerik

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

This thread is closed