RE: [PEAR] Query Regarding Paging in datagrid

From: Date: Fri, 23 Jun 2006 06:08:57 +0000
Subject: RE: [PEAR] Query Regarding Paging in datagrid
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24452@lists.php.net to get a copy of this message
Hello Sir Can U please tell me what should I Code inside the wrapper function function getMyPaging(&$datagrid) { ...} Since I use YD Framework the folowing is my coding $this->datagrid =& new Structures_DataGrid (10,null); $this->template->register_function('getMyPaging',array(& $this,'getMyPaging')); $this->datagrid->fill($this->template); $this->template->display(); I tried with the following but not solved function getMyPaging() { $params = array('mode' => 'Sliding', 'prevImg' => "<img src='img/prev.jpg' border=0 width=20 height=20>", 'nextImg' => "<img src='img/next.jpg' border=0 width=20 height=20>", 'perPage' => 5 ); $pager = & Pager::factory($params); } regards moses > -------- Original Message -------- > Subject: Re: [PEAR] Query Regarding Paging in datagrid > From: Olivier Guilyardi <ojaiml@nerim.net> > Date: Sat, June 10, 2006 3:31 am > To: moses@softwaysolutions.com > Cc: pear-general@lists.php.net > > moses@softwaysolutions.com wrote: > > Hi$pagingHtml = $renderer->getPaging();The above Coding displays the default paging > > format.If I want to change the paging format I can pass arguments.My Question isIn My application I > > wil be using a common paging format.Now what I am doing is at every time I am passing all the > > arguments.Is there any other way that where I will call only the getPaging() function and to specify > > the paging formats some where else and that format should apply to the paging when ever I call the > > function getPaging() without passing any arguments .regardsmoses > > > > You could just write a simple wrapper function, like : > function getMyPaging(&$datagrid) {...} > > Btw, if you use the Smarty renderer (as mentionned in your previous post), you > can use the Smarty function {getPaging} in your templates. Example : > > {getPaging prevImg="<<" nextImg=">>" separator=" | " > delta="5"} > > Now, what you could do, is to register your getMyPaging() wrapper function with > : Smarty::registerFunction(). > > So you should be able to simply write : > > {getMyPaging} > > -- > og

« previous php.pear.general (#24452) next »