Solved

remember the sort criteria of a datawindow

Posted on 2004-03-23
6
300 Views
Last Modified: 2013-12-26
Hi!

How to save the current sort criteria of a datawindow to aply another and later return to the first sort?

Thank you!
0
Comment
Question by:tsirakua
6 Comments
 
LVL 14

Accepted Solution

by:
sandeep_patel earned 125 total points
ID: 10664520
hi,
let's take an example that your datawindow has two columns emp_code and emp_name and you specified the sort criteria while designing the datawindow so your sort criteria is say
'emp_name A'.
now through script u can get this value by using

String is_sort  // instance variable
is_sort = dw_1.Object.datawindow.table.sort

you can store this value in instance variable, before applying another sort scriteria and can reapply later with
dw_1.setsort(is_sort) and
dw_1.sort()

hope it will work for u..if not reply...
-sandeep
0
 
LVL 18

Expert Comment

by:diasroshan
ID: 10664616
hi  tsirakua,
try the following code in the clicked event of a button...assuming that ur dw has retrieved....

String ls_sort, ls_caption

ls_caption = cb_sort.Text
If Upper(ls_caption) = 'SORT' Then
      is_oldsort = dw_1.Object.DataWindow.Table.Sort  // remember old sort criteria
      SetNull(ls_sort )
      dw_1.SetSort(ls_sort)   // ask user for sort criteria
      dw_1.Sort()
      cb_sort.Text = 'Release'
Elseif Upper(ls_caption) = 'RELEASE' Then
      dw_1.SetSort(is_oldsort)  // apply old sort criteria
      dw_1.Sort()
      cb_sort.Text = 'Sort'
End If      

let me know for further clarifications......

Cheers...
Rosh
0
 
LVL 18

Expert Comment

by:diasroshan
ID: 10664626
...oops ...a bit late....

...anyways just forgot to mention is_oldsort is an instance variable...

Cheers,,
Rosh
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 14

Expert Comment

by:sandeep_patel
ID: 10664667
Hi! Rosh,

don't worry man...better luck for next time..and still it's not closed....it's open........:)

-sandeep
0
 
LVL 8

Expert Comment

by:Vikas_Dixit
ID: 10666986
Hey this EE should have something like "Row (Page) changed between retrieve and update" :))
--Vikas
0
 

Author Comment

by:tsirakua
ID: 10669943
Thank you
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question