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 Listmove record up or downmove record up or down
Previous
 
Next
New Post
1/23/2008 7:11 PM
 

Is there any functionality currently to move a record up or down in a list of records? If not how can this be achieved?

Here's what I'm thinking, let me know if it makes sense or if there's a better way of doing it. Create a UserDefinedField of type Integer called SortField that is not visible. Then create a page handler that will take in the UserDefinedRowId and the desired action (move up or down). The page handler will first check to see if the SortField for that module is defined for each record, if it's not then it'll define it according to the order of the UserDefinedRowId in the dnn_UserDefinedRows table. So once the page handler receives the request to move a record up it'll check if it's the first record if it's not then it'll swap the SortField with the one above it. Same goes for last record.

For example given the following records listing:
0:red
1:blue
2:green

The page handler will be triggered as ".../UDTRecord.aspx?UserDefinedRowId=1&action=up"

which will give us the new listing:
0:blue
1:red
2:green

The links to move the record up or down can be generated within the XSL. Some questions though would be how to handle the display sorting and paging.  Looking forward to getting some feedback.

Frank

 
New Post
1/24/2008 2:38 AM
 

The main task is writing the page handler, and if we you want a clean design, it should not be handled inside the View Control (UserDefinedTable.ascx). Actually we have nothing similiar inside UDT. My first idea was to implement this feature as a datatype, however you need to pass the up/down event into it.   

I fear I can't help you any more at that stage, you would need to split your requirements into several concrete tasks first.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and Listmove record up or downmove record up or down


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