Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListAltering UDT3.5.1Altering UDT3.5.1
Previous
 
Next
New Post
7/6/2009 6:42 PM
 

Hi all,

Hope anyone can help me with this problem - I will try to describe it as precisely as I can.

I've added a feature to the original UDT module version 3.5.1.
Mainly' I've added a Filter-module, which can be setup to filter the values of any column added to the UDT module. I.E., if the user adds 4 columns to any UDT module, the filter module can be set up to use the distinct values of any single column of that UDT module.

The filter module is set up as a Links-module, which means that the values to be filtered by, are listet as links- and when clicked, they raise a OnModuleCommunication event with the appropiate filter information, which are picked up byt the UDT module. The UDT module then makes a Session variable, that are used in the GetRowFilter-function of the UDT module.

All works well, the UDT's dataview sets the the correct filter, but the data in the Datagrid does not change until F5 is hit in the browser?

So, if anyone can tell me, WHY the bindData function doesnt update, I'd appreciate it

 
New Post
7/8/2009 5:06 PM
 

Do you call bindData from the OnModuleCommunicationEvent?

 
New Post
7/9/2009 4:53 AM
 

Yes, the OnModuleCommunication event looks llike this:

 Public Sub OnModuleCommunication(ByVal s As Object, ByVal e As Entities.Modules.Communications.ModuleCommunicationEventArgs) Implements Entities.Modules.Communications.IModuleListener.OnModuleCommunication
     If e.Target = CStr(Me.ModuleId) Then

  Session("UDT_" & e.Target & "_Filter") = e.Text
  BindData()

     End If

 End Sub

and then I've added a codeline in the GetRowFilter Function :

 Private Function GetRowFilter(ByVal Filter As String, ByVal Search As String) As String
     ' Added by Martin Moesby Petersen to support "Userdefined Filtering"
     Filter = CStr(Session("UDT_" & CStr(Me.ModuleId) & "_Filter"))
    
' Martin Moesby Petersen - END

     Dim tr As TokenReplace = TokenReplace.Create(ModuleConfiguration)

     If Filter <> String.Empty Then.

  Filter = tr.ReplaceEnvironmentTokens(Filter)
     End If

     If Filter <> String.Empty AndAlso Search <> String.Empty Then
  Return "(" & Filter & ") AND (" & Search & ")"
     Else
  Return Filter & Search
     End If
 End Function

I've done that because that required the least modifikation to the module code and it's a function that's called  in all Binding-functions.

ANd when debugging, the datatview object in the Binding-functions shows the correct amount om entries to be shown...

     ' create a dataview to process the sort
     Dim dv As DataView = New DataView(DataSet.Tables(DataSetTableName.Data))
     Try
  Dim strFilter As String = GetRowFilter(CStrN(Settings(SettingName.Filter), ""), search.Filter)
  dv.RowFilter = strFilter '<---- this one sets the correct filter

So, basically, the UDT has the correct amount of entries, but it wont update? Only when pressing F5 in the Browser, the filter kicks in, and filters the data correctly.

If needed, I can uload the current version of the module to a demo site, so you can see your self, what the issue is...

Thx,

Martin

 
New Post
7/14/2009 6:01 PM
 

Well, I've got it acting sorta correctly, but It's not a very neat solution.

I've added a Response.redirect(PortalSettings.ActiveTab.Url) to the OnModuleCommunication, but honestly - it's not beatiful!

So, if ANYONE has any suggestions, I'd be happy to hear about it

 
New Post
9/16/2009 11:15 AM
 

Hey Martin

I am doing a similar thing in my code however i am not able to get the datagrid to updat. I have a filter that acts as a communicator and in my listener i get the value of the filter and pass it to stored procedure to get the new set of rows. Than i rebind my datagrid and then call UpdatePanel. All these controls are in an AJAX Update panel and some how i do not see the datagrid get updated with the new set of rows. Would you please advise and guide me here...

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListAltering UDT3.5.1Altering UDT3.5.1


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out