Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: ListView Sorting
Topic Summary:
Created On: 15-Feb-2006 16:01
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 15-Feb-2006 16:01
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

I figured out how to make Columns sort in a list view. You need to specify the
"listViewOptionSortText" option when the list view is defined, and you need to set the callback to the sort function after the column is created (look for "dxlSortFn" in the DXL manual). It appears that that sort function must be coded as its explained, which makes me wonder why its not a regular function. And its a type "int" function, not string.

The "options" I use when creating the list view is this ugly expression:
<listViewOptionMultiselect | listViewOptionCheckboxes | listViewOptionSortText>

If you create a column A with Col# N and define it as sortable, then insert a new column B in Col #N, A becomes Col#N+1; but the sortability stays with N which now applies to the wrong column B.

Also, it gets real sticky if the user sorts a column and then your DXL inserts a new column, since the insert must create its values based on the current sorted list and NOT based on the original order of the rows: this means to insert a column via some Button, you should retrieve the relevant information (e.g. the module name) from the DBE in the current order:
... for (RowNum=0; RowNum<NumRows; RowNum++)
... {Get module name from RowNum
... put module Prefix in ColN+1 for this RowNum.
... }

I cannot find a way to query for the title of a column. Thus if you do tricky column inserts the DXL has to keep track of which columns are which.

I'll avoid all those headaches by deciding ahead of time which columns will exist and define all of them as sortable. I'll create the ListView using an empty one-value array (string Empty[]={""}) and then manually set each value in the Row-Column matrix.

- Louie
Report this to a Moderator Report this to a Moderator
 15-Feb-2006 17:05
User is offline View Users Profile Print this message


Tarun Inabathuni

Posts: 59
Joined: 18-Jan-2005

Hi Louie

Yes if there was a way to get Column Names it would be much easier for sort and also to dynamically dump List view data to excel.

I wonder if some one knows a undocumented dxl command for getting column name.

regards
Tarun
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.