When engaged on giant or small-scale tasks in CS-Cart, managing CRUD operations within the admin panel may be time-consuming.
That’s the place the CS-Cart DataGrid is available in—a customized resolution designed to drastically scale back growth time and ship sooner tasks with minimal effort.
What’s CS-Cart DataGrid?
CS-Cart DataGrid is a flexible and reusable CRUD element constructed particularly for CS-Cart and admin panels. Furthermore, it simplifies CRUD operations, making CS-Cart growth sooner and simpler.
How is DataGrid Time-Saving and Value-Efficient for Your Tasks?
DataGrid helps save time by dealing with frequent duties like filtering, sorting, exporting, and bulk actions. Moreover, it’s straightforward to arrange and use, which makes managing CRUD sooner and smoother.
In CS-Cart tasks, fundamental duties like creating or updating information may be finished in hours as a substitute of days. Consequently, this implies faster supply, decrease prices, and happier shoppers.
Key Options of DataGrid’s
DataGrid is constructed utilizing CS-Cart’s core instruments, so it really works easily and performs properly. Listed here are the options
- Pagination
- Sorting
- Filtering
- Search
- Bulk actions ( Bulk delete, replace, and so on.)
- Export knowledge ( CSV, XML )
- Editable in fields
- Save Searches
How Builders Simply Develop a CRUD utilizing DataGrid
How DataGrid Works
To make use of DataGrid in a CS-Cart challenge, the CS-Cart Developer merely creates the DataGrid, view, and route handler recordsdata. After that, customise the DataGrid as wanted, and the CRUD interface is prepared
Pattern DataGrid
addColumn([
'index' => 'e.name', //table column name
'label' => __('name'),
'type' => 'string', //Boolean, Date, Integer, Text, Datetime
'sortable' => true,
'searchable' => true,
'filterable' => true,
'closure' => function($row) {
return ($row->status) ? 'Active' : 'Disabled';
} //customization to the value.
]);
}
public operate prepareActions()
{
$this->addAction([
'icon' => 'ty-icon-delete',
'title' => __('delete'),
'class' => 'cm-ajax cm-confirm',
'method' => 'POST',
'type' => 'delete',
'url' => function ($row) {
return fn_url("wk_erp_saved.delete?id=$row->id", 'A');
},
]);
}
}Handing Route
setRunMode(['m_delete', 'm_update', 'update', 'delete', 'manage']);
if (in_array($this->mode, $this->runMode)) {
$this->$mode();
}
}
public operate handle()
{
listing($lists, $search) = fn_datagrid(EmployeeDataGrid::class)->course of();
Tygh::$app['view']->assign('lists', $lists);
Tygh::$app['view']->assign('search', $search);
}
}Render DataGrid
{embrace file="addons/wk_datagrid/data-grid.tpl"
search_form_dispatch="emp.handle"
saved_search_name="emp"
export=true
is_editable="emp.m_update"
page_title=__('emp.erp_templates')
search_form_prefix="emp"
content_id="content_emp"
title="emp"
search_label="Search Templates"
knowledge=$lists
hook="emp"
column_width=[10,10,25,30,10]
}Why Use DataGrid?
- Speedy Setup: No have to manually deal with sorting, pagination, exporting knowledge, or filtering logic.
- Reusable Structure: Outline columns, filters, actions, and queries in a clear, organized construction.
- Totally Extensible: Simply integrates with add-ons or customized admin modules.
- Efficiency-Oriented: Constructed to deal with giant datasets effectively utilizing optimized SQL.
- Clear UI Integration: Grids are rendered utilizing native Smarty templates or may be custom-made.
Assist:
Nonetheless have any queries, be happy to ask by making a ticket http://webkul.uvdesk.com
In addition to this, you’ll be able to discover our CS-Cart Growth Companies and High quality CS-Cart add-ons.
Present Product Model – 1.0




