edit delete option disappearing in module
hi in my custom module for linting i am using following code
function list_items($limit = NULL, $offset = NULL, $col = 'id', $order = 'asc')
{
$this->db->select('name,image,box,sample_image', FALSE);
$data = parent::list_items($limit, $offset, $col, $order);
return $data;
}
but by this the edit delete option is disappearing while if i am using
$this->db->select('*', FALSE);
instead of
$this->db->select('name,image,box,sample_image', FALSE);
how should i keep the edit delete option while specifying the fields
Comments
CREATE TABLE `package_type` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`image` varchar(255) NOT NULL,
`sample_image` varchar(255) NOT NULL,
`box` enum('orange','blue','pink') NOT NULL,
`is_disabled` tinyint(1) NOT NULL DEFAULT '0',
`is_deleated` tinyint(1) NOT NULL DEFAULT '0',
`modified_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`post_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE `package_type`
ADD PRIMARY KEY (`id`);
ALTER TABLE `package_type`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0;
$this->db->select('id,name,image,box,sample_image', FALSE);
If using
table_headers
in Simple Module config you need to add the ID/Primary Key column to show EDIT/DELETE!Perfect! "ID" worked for me. Thanks!