jQWidgets Forums
Forum Replies Created
-
Author
-
December 29, 2014 at 11:27 am in reply to: Filtertype – missing labels Filtertype – missing labels #64778
Anyway to exclude it from the datasource so that it doesn’t interfere with existing webservice ?
December 29, 2014 at 10:52 am in reply to: Filtertype – missing labels Filtertype – missing labels #64772Hi Peter,
Example you posted requires me to add following column to my datasource:
{ name: ‘Country’, value: ‘countryCode’, values: { source: countriesAdapter.records, value: ‘value’, name: ‘label’ } },
Or something similar. Grid is binded to webservice and it has ( and will not have) such column. As i posted in such implementation attempts to filter on column that doesn’t exist in webservice.December 29, 2014 at 8:09 am in reply to: Filtertype – missing labels Filtertype – missing labels #64753Ok guys, I hope you had happy holidays, althought if i’m not mistaken in Bulgaria holidays are little later.
Taking few steps back to solve this problem, here is what I’m trying to achieve:
I have a column in DB that has single letter values repesenting statutes.
There can be millions of records.
Column in question is “Status”
Screen 1
Mappings are as follows:
{value:”A” , label: “Anulowany”},
{value:”N” , label: “Błąd numeracji”},
{value:”P” , label: “Brak podmiotu”},
{value:”U” , label: “Brak uprawnień”},
{value:”S” , label: “Do zidentyfikowania”},
{value:”O” , label: “Odrzucony”},
{value:”Z” , label: “Zarejestrowany”},
{value:”I” , label: “Zidentyfikowany”}
];Column definition:
{ text: ‘Status’, datafield: ‘status’, width: 150, filteritems: intrastat.filters.makeFilter(“SourceStatus”), cellsrenderer: intrastat.renderers.SourceStatusRenderer}
Both filteritesm and renderer take data from shared adapter with values listed above.Till now everything is wonderful and it works just great.
See screen 2 – happiness.
Screen 2
Now, users have option of having a filterbar visable – cause it’s a wonderful feature. Now it is simply a string bar and it has to be operated using strings from database – example below: Z = zarejestrowana
Screen 3Unfortunatelly, users don’t know the mappings and refuse to use them, so we wanted to have a checkedlist in place.
Added filtertype: ‘checkedlist’
This is what we get:
Screen 4From my tinkering I found that basically filtertype and filteritems interfere with each other.
All i want to get is a filter that I have in screen 2 (excel like filter with filteritems values) placed within the filterbar.
I tried using the example you posted but that required additional column in database. I played around with createfilterwidget – trying to overwrite the labels – they are empty – values as well as labels. I tried to replace them on open and close dropdown action, without any luckI seems like a simple enough thing, but I can’t seem to get it to work. Are those two options ( filteritems and filtertype) incompatible ?
Thanks,
December 19, 2014 at 10:51 am in reply to: Filtertype – missing labels Filtertype – missing labels #64483Peter,
Reason why statusList is a grid datafield was because i was trying to mimic example you posted
It has no representation in database and we weren’t planning on it.
Is there a way to make a checkedList filter bar example work without such datafield ?B
December 19, 2014 at 9:50 am in reply to: Filtertype – missing labels Filtertype – missing labels #64476localhost:8080/intrastat/json/deklZrod/get?
filterscount=1&
groupscount=0&
sortorder=&
pagenum=0&
pagesize=33&
recordstartindex=0&
recordendindex=33&
statusListoperator=and&
filtervalue0=A&
filtercondition0=CONTAINS&
filteroperator0=0&
filterdatafield0=statusList&
_=1418980134839once again link parsed for readability.
December 19, 2014 at 9:49 am in reply to: Filtertype – missing labels Filtertype – missing labels #64475Peter, look at webservice call i posted:
(i removed HTTP so that it doesn’t turn into a link, emphasis mine)
localhost:8080/intrastat/json/deklZrod/get?filterscount=1&groupscount=0&sortorder=&pagenum=0&pagesize=33&recordstartindex=0&recordendindex=33&statusListoperator=and&filtervalue0=A&filtercondition0=CONTAINS&filteroperator0=0&filterdatafield0=statusList&_=1418980134839Grid calls on filter value by statusList but it should by status – which is a real data store.
Note that filter value it passes is correct ( A ) not Anulowana.December 19, 2014 at 9:38 am in reply to: Filtertype – missing labels Filtertype – missing labels #64473Additionally, filter infomration ( function copied from example) works ok
{“statusoperator”:”and”,”filtervalue0″:”Anulowana”,”filterid0″:”A”,”filtercondition0″:”EQUAL”,”filteroperator0″:1,”filterdatafield0″:”status”}Yet still statusList is being passed to the server. I checked whole repository and we don’t parse filtering information anywhere
December 19, 2014 at 9:10 am in reply to: Filtertype – missing labels Filtertype – missing labels #64469Hi Peter,
I read carefully though the example and got it working.
However, for some ungodly reason filtering is getting applied to wrong column. I checked for typos and such but can’t seem to find the problem
`
datafields:
{ name: ‘status’, type: ‘string’ },
{ name: ‘statusList’, value: ‘status’, values: { source: filters.makeFilter(“SourceStatus”).records, value: ‘value’, name: ‘label’ } }filters.makeFilter(“SourceStatus”).records, returns dataAdapter with
SourceStatus:
{value:”A” , label: “Anulowana”},
{value:”N” , label: “Błąd numeracji”},
{value:”P” , label: “Brak podmiotu”},
{value:”U” , label: “Brak uprawnień”},
{value:”S” , label: “Do zidentyfikowania”},],Columns definition:
{ text: ‘Status’, datafield: ‘status’, filtertype: ‘checkedlist’, width: 100, editable: false, filteritems: intrastat.filters.makeFilter(“SourceStatus”), displayfield: ‘statusList’, createfilterwidget: function (column, htmlElement, editor) {
editor.jqxDropDownList({ displayMember: “label”, valueMember: “value” });
} },Column status is in database so grid works properly as long as I don’t try to sort or filter column status. if i do, I get:
Filter is getting aplied to column that overlays (statusList) rather then data column (status). What did I overlook ?
I’ve made sure to upgrade to JQWidgets and JQuery versions listed in the example.
Thanks,.
Bart
December 9, 2014 at 4:30 pm in reply to: Labeling filter values in grid Labeling filter values in grid #63968>Ah, well consider it a feature request then
+1
nevermind, autoheight wasn’t set properly. Sorry..
Bart
November 26, 2014 at 5:07 pm in reply to: excel filter entries in virtual mode/pagination excel filter entries in virtual mode/pagination #63410Thanks Dimitar. 100 was an example, records will be closer to couple millions
November 20, 2014 at 10:04 am in reply to: Select a row with value instead of index Select a row with value instead of index #63065Let me clarify:
We have a grid set up for virtual mode. It calls webservice and gets records pack matching a pagination set.
Customer wants to have ability to go to particular row ( based on different grid record… ).
We managed to rig it by making sequance of WS calls – first refresh grid, then find what page it is on, go to that page, then iterate. But go to makes second WS call, and we’d like to lower the DB load.Is there another way to rig it ?
B
November 20, 2014 at 9:49 am in reply to: Select a row with value instead of index Select a row with value instead of index #63064One thing I forgot, we have virtual mode on
Will that work ?
B
November 19, 2014 at 2:19 pm in reply to: Select a row with value instead of index Select a row with value instead of index #63020Dimitar, follow up question
what if there is pagination on final grid and record is on page other then page one ?I tried getboundrows instrad of getrows but i got some weird behaviour. Any ideas ?
B
November 13, 2014 at 3:58 pm in reply to: Adding new tab while existing tabs are hidden, adds them unwanted margin Adding new tab while existing tabs are hidden, adds them unwanted margin #62714Worked like a charm, thanks a bunch guys.
-
AuthorPosts