PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Datagrid Sorting Problem

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Structures
View previous topic :: View next topic  
Author Message
mononoke102



Joined: 06 Aug 2008
Posts: 6

PostPosted: Thu Dec 04, 2008 10:33 pm    Post subject: Datagrid Sorting Problem Reply with quote

Hi,

I need to get rid of hyperlink in the <th> (sorting function) from my grid.
It seems like there is no explanation on how to carryout this task.

Another question is, in my grid there is price section. In this section I called function m_link to add $ sign and formatted the integer stored there. Now sorting doesn't work..... Could someone please let me know why is this happening?

Example of my code on adding columns to the grid is pasted below....

Code:

$datagrid->addColumn(new Structures_DataGrid_Column('Asking Price', 'caskamt', 'caskamt',null, null, 'm_link'));


Could someone please help me.....

Thanks

M
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1230

PostPosted: Fri Dec 05, 2008 12:06 am    Post subject: Re: Datagrid Sorting Problem Reply with quote

mononoke102 wrote:
I need to get rid of hyperlink in the <th> (sorting function) from my grid.


This can be achieved by setting the third parameter of the column constructor to null.

mononoke102 wrote:
Another question is, in my grid there is price section. In this section I called function m_link to add $ sign and formatted the integer stored there. Now sorting doesn't work..... Could someone please let me know why is this happening?


"Doesn't work" is always a bad description. But let me guess: You're expecting the sorting to include your formatting changes? That won't work -- SDG just sorts the data it gets from the datasource, e.g. from an array, a SQL query etc. (passed via the bind() call). If me guess was wrong, please provide more details.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Structures All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement