Advise on creating a searchable datagrid

From: Date: Tue, 14 Jun 2005 01:56:03 +0000
Subject: Advise on creating a searchable datagrid
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19611@lists.php.net to get a copy of this message
Hi there, I have run into a problem creating a search filter upon a datagrid have to first freeze the posted data into a session , which i then send to the datagrid, because upon clicking the second page you have left the post data if posting directly to the datagrid. Ignore the dataobject setLogic and setFrom hack these are from a custom subclass so are custom to what i need to do. What actaully is my problem is as soon as i've froze the search data into a session, i have no means to clean it back if needed. I had one solution, of when clicking the menu in the list it does an ajax connection to clear the session ? I have tried if there is no page query set clear the session but it doesnt work :\ Lemme know. function action_default() { $progress = DB_DataObject::factory('issues'); $progress->getProgress($this->auth->is_admin() || $this->auth->is_superuser()); $progress->whereAdd('issues.issue_statusID NOT IN (4)'); if (isset($_SESSION['search'])) { $data = unserialize($_SESSION['search']); $progress->setLogic($data['search_type']); $progress->setFrom($data,'%s',true); unset($progress->search_type); //if (!$_GET['page']) unset($_SESSION['search']); } else { if (!$this->auth->is_admin()) { $progress->getFilteredProgress(); } } /** * The data grid method for listing a datagrid listing. <br> * Uses Structures_DataGrid, MDB2 datasource driver.<br> * Send the DataObject and the datagrid template. */ parent::data_grid($progress, 'progress_list.html'); }

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