![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: ListView Sorting Topic Summary: Created On: 15-Feb-2006 16:01 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
ListView Sorting
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.