jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Filter row for nested grids?
Tagged: filter rows, nested jqxgrids
This topic contains 2 replies, has 1 voice, and was last updated by ssp 11 years, 10 months ago.
-
Author
-
Does Filter row(search toolbar) works for nested jqxgrids??
bcz when I filter, the icon which will be in leftmost column to expand the nested grids disappear and thus I wont be able to expand the nested grid…
ssp
Hi,
I have to add filter textbox(search toolbar) in every column of the nested grids,
The filter row operation is working fine in every column,
but the problem I am facing is, after filtering, the icon for expanding the nested grid disappears!
this is happening bcz after the filterable is set to true, it is not calling binding event used for the nested grid.How will I implement filter textboxes in nested grids??
var sourceFirstGrid =
{
datatype: “json”,
datafields: [
{ name: ‘leadProjectNumber’, type: ‘string’ },
{ name: ‘projectNumber’, type: ‘string’ },
{ name: ‘pdxType’, type: ‘string’ },
{ name: ‘crProjectId’, type: ‘string’ }
],
cache: false,
url: ‘getFirstGridForRevisionHistory.htm’};
var firstGridAdapter = new $.jqx.dataAdapter(sourceFirstGrid);$(“#jqxFirstgridHistory”).jqxGrid(
{
width: ’100%’,
source: firstGridAdapter,
theme: theme,
autoheight: true,
editable: false,
columnsresize: true,
rowdetails: true,
selectionmode: ‘multiplecellsadvanced’,
showstatusbar : true,
statusbarheight : 00,
initrowdetails: initlevel2,
showfilterrow: true,
filterable: true,
/* rendergridrows: function () {
return firstGridAdapter.records;
}, */
columns: [
{ text: ‘LeadProjectNumber’,columntype: ‘textbox’, filtertype: ‘textbox’, filtercondition: ‘starts_with’, datafield: ‘leadProjectNumber’, align: ‘center’,width: 150},
{ text: ‘Project Number’, datafield: ‘projectNumber’,align: ‘center’, width: 150 },
{ text: ‘PDx Type’, datafield: ‘pdxType’,align: ‘center’, width: 150 },
{ text: ‘CR ProjectId’, datafield: ‘crProjectId’,align: ‘center’, width: 150 }
]
});
// set rows details.
$(“#jqxFirstgridHistory”).bind(‘bindingcomplete’, function (event) {
alert(“bindingcompletye”);
if (event.target.id == “jqxFirstgridHistory”) {
$(“#jqxFirstgridHistory”).jqxGrid(‘beginupdate’);var datainformation = $(“#jqxFirstgridHistory”).jqxGrid(‘getdatainformation’);
for (var i = 0; i < datainformation.rowscount; i++) {$(“#jqxFirstgridHistory”).jqxGrid(‘setrowdetails’, i, ”
“, 220, true);
}
$(“#jqxFirstgridHistory”).jqxGrid(‘endupdate’);
}});
});Thanks & Regards,
Sandhya S PIs it possible to implement search toolbar in nested grids?
In the below code I am trying to use getfilterinformation to bind and set row details to the nested grid, but it doesn’t work,Will the getfilterinformation help to obatin the filtered data and bind it to the nested grid??
$("#jqxFirstgridHistory").bind('bindingcomplete', function (event) { if (event.target.id == "jqxFirstgridHistory") { $("#jqxFirstgridHistory").jqxGrid('beginupdate'); var datainformation = $("#jqxFirstgridHistory").jqxGrid('getdatainformation'); for (var i = 0; i < datainformation.rowscount; i++) { $("#jqxFirstgridHistory").jqxGrid('setrowdetails', i, "<div style='margin: 10px'>", 220, true); } $("#jqxFirstgridHistory").jqxGrid('endupdate'); <strong> $("#jqxFirstgridHistory").bind('filter', function (event) { $("#jqxFirstgridHistory").jqxGrid('beginupdate'); var filterInfo = $("#jqxFirstgridHistory").jqxGrid('getfilterinformation'); for (var j = 0; j < filterInfo.length; j++) { alert(getfilterinformation); $("#jqxFirstgridHistory").jqxGrid('setrowdetails', i, "<div style='margin: 10px'>", 220, true); } $("#jqxFirstgridHistory").jqxGrid('endupdate'); });</div></strong> } }); var firstGridAdapter = new $.jqx.dataAdapter(sourceFirstGrid); $("#jqxFirstgridHistory").jqxGrid( { source: firstGridAdapter, rowdetails: true, selectionmode: 'multiplecellsadvanced', initrowdetails: initlevel2, <strong> showfilterrow: true, filterable: true, </strong> </div>
-
AuthorPosts
You must be logged in to reply to this topic.