jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Group Rendering issue
Tagged: grid groups renderer
This topic contains 1 reply, has 2 voices, and was last updated by Peter Stoev 11 years, 1 month ago.
-
AuthorGroup Rendering issue Posts
-
Hi,
I am adding rows in the grid dynamically using addrow() method and the grid is grouped
Following is the code snipped of the grid initilizatonCurrentFilterGrid: function () {
var filterGridDataAdapter = new $.jqx.dataAdapter(TC.filters.addeditviews.variables.filterGridSource);$(“#divFilters”).jqxGrid(
{
width: ‘650’,
height: ‘200’,
source: filterGridDataAdapter,
groupable: true,
groupsexpandedbydefault: true,
theme: TC.filters.addeditviews.variables.theme,
sortable: true,
showheader: false,
showgroupsheader: false,
localization: TC.filters.addeditviews.getLocalization(),
columns: [
{ dataField: ‘VIEW_ID’, hidden: true },
{ dataField: ‘FILTER_TYPE’, hidden: true },
{ text: ”, dataField: ‘FILTER_VALUE’, width: ‘120’ },
{ text: ”, dataField: ‘FILTER_VALUE_DESCR’, width: ‘350’ },
{
text: ”,
width: ’70’,
cellsalign: ‘center’,
cellsrenderer: function (row) {
return ‘<input type=”button” class=”button-link link” value=”Remove”/>’;
}
}
],
groups: [‘FILTER_TYPE’],
groupsrenderer: function (defaultText, group, state, params) {
return “<div style=’margin: 5px;background-color: #B7C3D0′><b>” + params.subItems[0].FILTER_TYPE_DESCR + “</b></div>”;
}
});
},I am facing a strange issue that if i add the first row of the grid first group created and displays that row
then i created another row of another group type second group created and show the row.
then i added two more rows in the first group and now the first group contains 3 rows..
then i removed the first row from the grid and the grouprenders the second group as first and the first group comes to the bottom of the list.Hi Yogesh,
The provided code is not sufficient for testing your scenario. Please, provide a small sample which demonstrates an issue. One thing which I noticed is that you use: params.subItems, but that is not necessary to be defined. You should check whether there are subItems or not as in our Groups Renderer demo.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.