how to sort a tlist programatically...??help? [message #115350] |
Sun, 10 April 2005 05:42 |
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 #115399 is a reply to message #115350] |
Mon, 11 April 2005 05:51 |
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.
|
|
|