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 ForumsRepositoryRepository"Reset" button for search and category/attribute filters"Reset" button for search and category/attribute filters
Previous
 
Next
New Post
6/20/2008 1:28 PM
 

Hello, I'm trying to add a "Reset" button to the repository header.  The button would work such that it would reset all the category and attribute dropdown boxes to "All" and remove and Search terms that are currently filtering the repository entries displayed-- basically it would "Show All." I've managed to add the button and have it clear the search terms, with an event handler for the button printed below.  But attempts to reset the dropdownlists cause no repository entries to display.  I've been trying to set values for the oRepositoryBusinessController, but when the selected values are changed, again no repository entries are displayed. Any tips? Thanks.

 

Private Sub btnReset_Click(ByVal sender As Object, ByVal e As System.EventArgs)CType(lstObjects.CurrentPageIndex, String)End Sub

mFilter = ""

ViewState("mFilter") = mFilter

lstObjects.CurrentPageIndex = 0

ViewState("mPage") =

BindObjectList()

 

 

 
New Post
6/21/2008 7:08 AM
Accepted Answer 

it's probably how you pasted your source code, but you should set ViewState("mPage") to "0"

try this...

mFilter = String.Empty
mItemID = String.Empty
mSortOrder = "CreatedDate"

ViewState("mPage") = "0"
ViewState("mFilter") = mFilter
ViewState("mItemID") = mItemID
ViewState("mSortOrder") = mSortOrder
ViewState("mAttributes") = String.Empty
lstObjects.CurrentPageIndex = 0

oRepositoryBusinessController.g_CategoryId = -1
oRepositoryBusinessController.g_Attributes = ""

CreateCookie()
BindObjectList()

 
New Post
6/23/2008 7:02 AM
 

Interesting.  The "reset" button behavior now works properly, but after the button is clicked, the "Sort By" dropdownlist, Search textbox, and Reset button all disappear from the repository header.  Why would that happen? 

 
New Post
6/25/2008 10:02 AM
 

Ok, the "disappearing" areas of the header problem has been resolved. I discovered that it wasn't that the items were gone, but rather they were hidden beneath some other page content-- so something wasn't loading properly.  I then noticed that the default sort order was set to "CreatedDate," which I have removed as an option.  I changed the sort order to one I am using and now everything works perfectly. Thanks a lot for the help.

 
New Post
6/25/2008 10:48 AM
 

awesome!! glad you got it worked out.

If you have any more questions or issues, don't hesitate to ask.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepository"Reset" button for search and category/attribute filters"Reset" button for search and category/attribute filters


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