Home » Developer & Programmer » Forms » how to sort a tlist programatically...??help?
icon4.gif  how to sort a tlist programatically...??help? [message #115350] Sun, 10 April 2005 05:42 Go to next message
ramisy2k
Messages: 150
Registered: April 2005
Senior Member
Hi.
i have a tlist and I used the following code to populate the tlist data from a table on the when new form instance trigger....

declare
my_rg_id RecordGroup;
v_error number;
begin
my_rg_id := create_group_from_query('my_rg', 'select match_id || VENUE ||
match_DATE, to_char(match_id) id FROM table ORDER BY MATCH_ID');
v_error := populate_group(my_rg_id);
if v_error = 0 then
populate_list('block.tlist_name', my_rg_id);
end if;
end;



when i run the form the tlist is populated with the data and is sorted by the first column (match_id) which i set as default in the above coding..

the problem is that now i want to create a button and when it will be pressed the tlist should sort by the 'match_Date' column which is also shown in the tlist
please tell me how can i achive this...as the tlist is already populated and sorted by 'match_id' column...
i would be grateful if someone write the complete code for me...

regards,
Ramis.
Re: how to sort a tlist programatically...??help? [message #115370 is a reply to message #115350] Sun, 10 April 2005 19:21 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
The tlist is just another object ... in your when-button-pressed delete the tlist and then rebuild it with the 'order' that you require
Re: how to sort a tlist programatically...??help? [message #115399 is a reply to message #115350] Mon, 11 April 2005 05:51 Go to previous message
subba lakshmi
Messages: 36
Registered: March 2005
Member
hello friend

you didn't clearly mention whether you want to order your tlist by both the columns match_id and match_date or only match_date.
if it is both in the query order by clause you apart from match_id add match_date column also.if it is just match_date
in place of match_id you give match_date query on button press.
Previous Topic: Error while opening a form(forms 9i)
Next Topic: Terminated with error
Goto Forum:
  


Current Time: Wed Sep 18 19:57:14 CDT 2024