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 ForumsDocumentsDocumentsCan i defne DESC sortingCan i defne DESC sorting
Previous
 
Next
New Post
10/8/2006 7:06 PM
 
Hi All
Dose some one know if i can define the sorting to be in DESC order (it appear that it is set to ASC)

I'd like to define the sorting so the latest documents will appear on the top (and older on the bottom)
however when i select to sort by Modified Date the documents sorted ASC (new down and old up)

Tx Dan
 
New Post
10/9/2006 12:50 AM
 
What table|field|module|datagrid|screen are you referring to?

Dwayne J. Baldwin
 
New Post
10/9/2006 12:23 PM
 
Sorry that i wasn't clear
I meant for the Documents module of course (as this is a discussion of the Documents project).
 
New Post
10/10/2006 5:59 PM
 

My bad. I should have looked too.  Quick hack is to add a minus sign to the return statement and rebuild.

DocumentComparer.vb
Case DocumentsDisplayColumnInfo.COLUMN_MODIFIEDDATE
If objX.ModifiedDate.CompareTo(objY.ModifiedDate) <> 0 Then
Return -objX.ModifiedDate.CompareTo(objY.ModifiedDate)
End If

 

The proper way is to add the new sort feature...

 

DocumentsDisplayColumnInfo.vb
Public Const COLUMN_MODIFIEDDATEDESC As String = "ModifiedDateDesc"

Public Shared AvailableDisplayColumns() As String = New String()
COLUMN_MODIFIEDDATE, _
COLUMN_MODIFIEDDATEDESC, _

Public Shared AvailableSortColumns() As String = New String() _
COLUMN_MODIFIEDDATE, _
COLUMN_MODIFIEDDATEDESC, _

 

DocumentComparer.vb

Case DocumentsDisplayColumnInfo.COLUMN_MODIFIEDDATE

                    If objX.ModifiedDate.CompareTo(objY.ModifiedDate) <> 0 Then

                        Return objX.ModifiedDate.CompareTo(objY.ModifiedDate)

                    End If

                Case DocumentsDisplayColumnInfo.COLUMN_MODIFIEDDATEDESC

                    If objX.ModifiedDate.CompareTo(objY.ModifiedDate) <> 0 Then

                        Return -objX.ModifiedDate.CompareTo(objY.ModifiedDate)

                    End If

               

Document.ascx.vb

Case DocumentsDisplayColumnInfo.COLUMN_MODIFIEDDATE

                                AddDocumentColumn("ModifiedDate", "ModifiedDate", "{0:d}")

 

                            Case DocumentsDisplayColumnInfo.COLUMN_MODIFIEDDATEDESC

                                AddDocumentColumn("ModifiedDateDesc", "ModifiedDateDesc", "{0:d}")

 

Document.acsx.resx

ModifiedDate.Header

Modified Date

ModifiedDateDesc.Header

 

Modified Date Desc

EditDocumentsSettings.ascx.resx


ModifiedDate.Header

 

Modified Date

ModifiedDateDesc.Header

Modified Date (newest)

 

I hope this is of some help to you.

 


Dwayne J. Baldwin
 
New Post
10/13/2006 6:12 AM
 
Hi djbaldwin
Tx a lot.
Unfortunately I'm dot a dotnet developer and i don't have the required software to "
rebuild".

i hoped that there is a default sort that i can add to the get_document stored procedure but i didn't succeed to set it right.

Tx Dan

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsDocumentsDocumentsCan i defne DESC sortingCan i defne DESC sorting


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