jQWidgets Forums
Forum Replies Created
-
Author
-
October 27, 2015 at 11:32 am in reply to: Cascaded Filter in JqxGrid Cascaded Filter in JqxGrid #77382
Thanks for the reply Dimitar.
October 26, 2015 at 12:06 pm in reply to: Cascaded Filter in JqxGrid Cascaded Filter in JqxGrid #77328And, if i reset all the column’s filter items. Javascript error is thrown:-
Uncaught RangeError: Maximum call stack size exceeded
October 26, 2015 at 12:05 pm in reply to: Cascaded Filter in JqxGrid Cascaded Filter in JqxGrid #77327Also, if i used this code for last column (which filter has cleared):-
if(filterGroup == undefined){$(‘#grid’).jqxGrid(‘removefilter’, filter_column, true);
rows = $(‘#grid’).jqxGrid(‘getrows’);var items = [];
for(var i = 0; i < rows.length; i++)
{
var row = rows[i];
var dataFieldName = filter_column;
if(items != null){
var flag=1;
for(var m = 0; m < items.length; m++)
{
if(items[m] == row[dataFieldName]){ flag=0; break;}
}
}
if(flag == 1){
items.push(row[dataFieldName]);
}
}$(“#grid”).jqxGrid(‘setcolumnproperty’, filter_column, ‘filteritems’, items);
}
The other columns, on which filter has not applied , filter items are not reset properly for them.
Thanks,
NehaOctober 26, 2015 at 11:01 am in reply to: Cascaded Filter in JqxGrid Cascaded Filter in JqxGrid #77316Hi,
In the cascade filtering, i have done the following code:-
$(“#grid”).on(‘filter’, function (){
var filterGroups = $(“#grid”).jqxGrid(‘getfilterinformation’);
var rows = $(‘#grid’).jqxGrid(‘getrows’);var filterGroup = filterGroups[filterGroups.length-1];
if(filterGroup == undefined){$(“#grid”).jqxGrid(‘clearfilters’);
}else{
if(filterGroup != null){
filter_column = filterGroup.filtercolumn;
alert(‘filter_column:’ + filter_column);for (var j = 0; j < dataFieldsOfGrid.length; j++) {
var items = [];
if(filter_column == dataFieldsOfGrid[j].name){
continue;
}
for(var i = 0; i < rows.length; i++)
{
var row = rows[i];
var dataFieldName = dataFieldsOfGrid[j].name;
if(items != null){
var flag=1;
for(var m = 0; m < items.length; m++)
{
if(items[m] == row[dataFieldName]){ flag=0; break;}
}
}
if(flag == 1){
items.push(row[dataFieldName]);
}
}$(“#grid”).jqxGrid(‘setcolumnproperty’, dataFieldsOfGrid[j].name, ‘filteritems’, items);
}
}
}
});The code is working fine for cascade filtering (on suppose 4-5 columns). But filteritems in filter checkedlist may not remain correct if we clear filters from the filter dropdown by clciking on clear button(there are 2 buttond Filter and Clear in filter dropdown).
The column JSON is given below for my grid:-
{“text”:”Invest Style”,”pinned”:false,”hidden”:false,”width”:112,”filtertype”:”checkedlist”,”datafield”:”Invest_Style”},
{“text”:”Market Seg”,”pinned”:false,”hidden”:false,”width”:110,”filtertype”:”checkedlist”,”datafield”:”Market_Seg”},
{“text”:”Portfolio Code”,”pinned”:false,”hidden”:false,”width”:114,”filtertype”:”checkedlist”,”datafield”:”Portfolio_Code”},
{“text”:”Sri”,”pinned”:false,”hidden”:false,”width”:103,”filtertype”:”checkedlist”,”datafield”:”Sri”},
{“text”:”Style Category”,”pinned”:false,”hidden”:false,”width”:114,”filtertype”:”checkedlist”,”datafield”:”Style_Category”},
{“text”:”Tax Status”,”pinned”:false,”hidden”:false,”width”:110,”filtertype”:”checkedlist”,”datafield”:”Tax_Status”},
{“text”:”Type”,”pinned”:false,”hidden”:false,”width”:104,”filtertype”:”checkedlist”,”datafield”:”Type”},
{“text”:”Attribute”,”pinned”:false,”hidden”:false,”width”:109,”filtertype”:”checkedlist”,”datafield”:”Attribute”},
{“text”:”Value”,”pinned”:false,”hidden”:false,”width”:105,”filtertype”:””,”datafield”:”Value”}and other data related grid is :–
$(“#grid”).jqxGrid(
{
theme: ‘energyblue’,
width: 98 + ‘%’,
height: 250,
filterable: true,
// sortable: true,
source: dataAdapter,
selectionmode: ‘multiplecellsadvanced’,
columnsresize: true,
columns: columnsOfGrid
}I have also called ‘clearFilters’, but my problem is not resolved. Problem is, if we clear all the filters one by one, when last filter is cleared, its filter items are not getting reset. Is there any option to reset filter items?
Please provide the solution ASAP.
October 21, 2015 at 5:05 am in reply to: Suggest like Input box above the 'Checked Boxes' filters lists Suggest like Input box above the 'Checked Boxes' filters lists #77161Thanks Vladimir.
October 20, 2015 at 12:23 pm in reply to: Suggest like Input box above the 'Checked Boxes' filters lists Suggest like Input box above the 'Checked Boxes' filters lists #77144Looks like screenshot is not attached.
Description is :
for data shown above, if users enters ‘Ch’ in Filter suggestion input box, the checked boxes list
shopuld show only :Chocolate1
Chocolate2
Chocolate3and user can select any one of them. Such that ‘getfilterinformation’ method will return checked values and NOT the typed ‘Ch’
October 16, 2015 at 5:37 am in reply to: How to turn on/off Grid selection for specific columns, cells or rows. How to turn on/off Grid selection for specific columns, cells or rows. #76949Thanks Dimitar.
October 14, 2015 at 5:08 am in reply to: Cascaded Filter in JqxGrid Cascaded Filter in JqxGrid #76818Thanks Vladimir.
October 13, 2015 at 12:17 pm in reply to: Cascaded Filter in JqxGrid Cascaded Filter in JqxGrid #76782Hi Vladimir,
Thanks for the quick reply.
The issue is not related to data population in grid according to filter applied. The issue is with data in Filtered checkedlist( in Select Filter Dropdown).
e.g Data is given below for grid:-
Country City (These are headers)
India Bombay
India Delhi
US NJ
US NYWhen applied filter as ‘India‘ on Country column, Grid shows me 2 rows as given below:-
Country City (These are headers)
India Bombay
India Delhibut, when i applied filter again on City column on this data , filter drop down shows four values (Bombay, delhi, NJ, NY). Filter drop down must show 2 values now (Bombay, Delhi).
Filter dropdown should shown/change values according to currently loaded data in grid.
But, Filter Dropdown is showing all the values (with all the values when the grid is loaded very first time).
I want to apply Excel like Auto Filter feature.
Thanks,
NehaSeptember 25, 2015 at 4:50 am in reply to: By Clicking on column header, select only filtered rows of that column By Clicking on column header, select only filtered rows of that column #76171Thanks Peter.
-
AuthorPosts