Hi,
I was able to progress on this up to some extent by writing some code in the
RemoteObject result handler.
initDG.sort = new Sort(); //initDG is the dataprovider for my
datagrid
var sortField:SortField = new SortField(field,true, flag);//field
is DG column name; flag indicates Ascending/descending
sortField.compareFunction = new Function();
initDG.sort.fields = [sortField];
initDG.refresh();
flag = !flag;
This code works fine when we dont have any formatted columns by using
labelFunction. But in my datagrid i am formatting some columns using
labelFunction, for those columns i was not able to retain the sort arrow.
I have very less time to do this, Please help me on this. If possible send some
code snippets.
I appreciate your help.
Thanks,
Venkat.
----- Original Message ----
From: Alex Harui <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: [email protected]
Sent: Sunday, 10 August, 2008 12:21:30 AM
Subject: [flexcoders] RE: [flexcomponents] maintaining sort arrow icon with
server side sorting of datagrid
I think people have been successful using
a subclass of a collection that either overrides the sort property or refresh()
method so the collection doesn’t actually sort. The DataGrid reads the sort
property and sets up the sortArrow, but never calls refresh() if you call
preventDefault( ) on headerRelease event.
________________________________
From:flexcomponents@ yahoogroups. com [mailto: flexcomponents@ yahoogroups. com
] On Behalf Of venkateswarlu naidu
Sent: Saturday, August 09, 2008
7:16 PM
To: flexcomponents@ yahoogroups. com
Cc: [EMAIL PROTECTED] ups.com
Subject: [flexcomponents]
maintaining sort arrow icon with server side sorting of datagrid
Hi,
I have a question on datagrid serverside sorting. Genarally sort arrow icon
will be displayed by default when you click on datagrid header. But in my
requirement, i am doing a server side sorting and getting a new dataset when i
click on the header. I am making a remote call when headerRelease event occurs
and assigning the new dataset to the DataGrid's dataprovider.
In this sccenario, i am not able to get the sort arrow icon and can not
maintain the scroll bar state because datagrid will be refreshed completely
with new dataset.
Is there any way to maitain the sort arrow icon and scroll bar state.
Please help me on this.
Thanks in advance,
Venkat.
Unlimited freedom, unlimited storage. Get it now, on http://help. yahoo.com/
l/in/yahoo/ mail/yahoomail/ tools/tools- 08.html/
Unlimited freedom, unlimited storage. Get it now, on
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/