jQWidgets Forums
Forum Replies Created
-
Author
-
Hello Dimitar,
Please, could you show me an jqxGrid example with json data but i need to show different row names from datafields. Also each city need to be in new grid.
grid1
Name | Las Vegas
State | Nevada
Founded | 05-15-1905
Area | 352
Population | 596,424grid2
Name | Los Angeles
State | California
Founded | 09-04-1781
Area | 1,302
Population | 3,857,799grid3
… and more."city": [ { "c":"Las Vegas", "s":"Nevada", "f":"05-15-1905", "a":"352", "p":"596,424" }, { "c":"Los Angeles", "s":"California", "f":"09-04-1781", "a":"1,302", "p":"3,857,799" } ]
Muchas Gracias!
April 7, 2014 at 8:47 am in reply to: group-function with json-data for drop down list group-function with json-data for drop down list #52617Hello!
Is it possible to group data by my situation? Im using dropdown list for fitlering jqxgrid column. In column there is multiple similar records, for example names: Ashley, Anna, Elizabeth, Emily, Anna, Rachel, Ashley, Sarah, Sarah, Anna, Elizabeth …
My code principle is to bind from jqxgrid records to dropdownlist.
I need result in dropdownlist like
Ashley,
Anna,
Elizabeth,
Emily,
Rachel,
Sarah.$("#names").jqxDropDownList({ selectedIndex: 0, displayMember: "nam", valueMember: "name", promptText: "", incrementalSearch: true, incrementalSearchDelay: 400, theme: theme, width: 100, autoDropDownHeight: true }); $('#valuta').bind('select', function (event) { var args = event.args; var item = $('#valuta').jqxDropDownList('getItem', args.index); addfilter3(item); }); var addfilter3 = function (items) { var fnameFilterGroup = new $.jqx.filter(); var filter_or_operator = 1; var filtervalue = items.label; var filtercondition = 'EQUAL'; var fnameFilter1 = fnameFilterGroup.createfilter('stringfilter', filtervalue, filtercondition); fnameFilterGroup.addfilter(filter_or_operator, fnameFilter1); $("#jqxgrid").jqxGrid('addfilter', 'val', fnameFilterGroup); // apply the filters. $("#jqxgrid").jqxGrid('applyfilters'); };
I tried to make something like http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/index.htm#demos/jqxgrid/customfiltering.htm but without success. Can you post some working code example like my situation?
Thank You! -
AuthorPosts