Hello,
I have a list grid of persons with a data source and I have enabled the filter editor.
Now I want to filter persons, for example show me all persons with the first name John. This works well, but only in the case, when not all rows are loaded in the grid.
This means when the number of data is so low, that all data is displayed with one paging, like in the below JSON. In this case, the Johns will not be shown.
Only the message: "No items to show"
Also when I scroll through a huge number of rows and they are after that all loaded into the grid, then the Johns are not shown as well.
But when only a part of the rows are loaded, all filtered Johns are shown correctly.
What have I done wrong? How could I filter rows also in a completely loaded grid?
Regards Thomas
Grid Code:
Datasource JSON
I have a list grid of persons with a data source and I have enabled the filter editor.
Now I want to filter persons, for example show me all persons with the first name John. This works well, but only in the case, when not all rows are loaded in the grid.
This means when the number of data is so low, that all data is displayed with one paging, like in the below JSON. In this case, the Johns will not be shown.
Only the message: "No items to show"
Also when I scroll through a huge number of rows and they are after that all loaded into the grid, then the Johns are not shown as well.
But when only a part of the rows are loaded, all filtered Johns are shown correctly.
What have I done wrong? How could I filter rows also in a completely loaded grid?
Regards Thomas
Grid Code:
Code:
isc.ListGrid.create( { "ID":"personsListGrid_6", "selectionChanged":function (p1, p2) {selectionChangedTransportEvent(this, "6", "4", null ,p1, p2); }, "recordDoubleClick":function (p1, p2, p3, p4, p5, p6, p7) {recordDoubleClickTransportEvent(this, "6", "5", "Loading" ,p1, p2, p3, p4, p5, p6, p7); }, "selectionType":"multiple", "timeFormatter":"toShortTime", "sortField":"lastnameField", "sortDirection":"ascending", "showFilterEditor":true, "autoFetchTextMatchStyle":"startsWith", dataSource:isc.DataSource.create( { "fields": [ { "name":"generatedIndex", "primaryKey":true, "hidden":true, "canEdit":false, "canSort":false, "valueMap": { } }, { "name":"lastnameField", "title":"Name", "type":"text", "width":250, "canEdit":false, "canSort":true, "hoverHTML":"return 'The employees family name(s).'", "showHover":true }, { "name":"firstnameField", "title":"First name", "type":"text", "width":150, "canEdit":false, "canSort":true, "hoverHTML":"return 'The employees Christian name(s).'", "showHover":true }, { "name":"personelNumberField", "title":"Personnel number", "type":"text", "width":150, "canEdit":false, "canSort":true, "hoverHTML":"return 'Unique personnel number. Usually defined by payroll.'", "showHover":true }, { "name":"userIdField", "title":"User-ID", "type":"text", "width":150, "canEdit":false, "canSort":true, "hoverHTML":"return 'Unique criterion which the employee uses to log-in to HRworks.'", "showHover":true }, { "name":"organizationUnitField", "title":"Organization unit", "type":"text", "width":150, "canEdit":false, "canSort":false, "filterEditorType":"SelectItem", "filterEditorValueMap": { 1:"*", 2:"Warning: wrong prefix of None", 3:"" }, "defaultFilterValue":1, "hoverHTML":"return 'Organization unit'", "showHover":true } ], "dataFormat":"json", "dataURL":"ScListGridTransport?viewNumber=6&id=personsListGrid", "transformRequest":clwTransformRequest, "transformResponse":clwTransformResponse, "recordXPath":"/resultData" } ), "autoFetchData":true, "dataPageSize":30 } ),
Code:
{ "totalRows":4, "endRow":3, "startRow":0, "resultData": [ { "userIdField":"Peter", "personelNumberField":"2134", "lastnameField":"McCoy", "firstnameField":"Peter", "organizationUnitField":"", "generatedIndex":"1" }, { "userIdField":"George", "personelNumberField":"85", "lastnameField":"Mcintosh", "firstnameField":"George", "organizationUnitField":"", "generatedIndex":"2" }, { "userIdField":"q", "personelNumberField":"1", "lastnameField":"Miller", "firstnameField":"John", "organizationUnitField":"", "generatedIndex":"3" }, { "userIdField":"JohnR", "personelNumberField":"945", "lastnameField":"Rice", "firstnameField":"John", "organizationUnitField":"", "generatedIndex":"4" } ] }
Comment