JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Row filter not showing after server side data load
Tagged: Row filter not showing
- This topic has 7 replies, 5 voices, and was last updated 3 years, 4 months ago by yavordashew.
-
AuthorPosts
-
March 9, 2021 at 4:27 pm #101582GouravMember
Hi Team,
I m using server side data when data load row filter not visible.
virtualDataSource: (resultCallbackFunction, details) => {
const pageSize = details.last – details.first
const pageNumber = details.last/pageSize;
if (details.action === ‘pageIndexChange’) {
this.getPage(pageNumber,details);
}else if(details.action === ‘filter’){
this.getPage(1,details);
}else if(details.action == ‘sort’){
if(details.sorting.length > 0){
this.getPage(pageNumber,details);
}else{
const result = data;
const total = data_size;
resultCallbackFunction({
dataSource: result,
virtualDataSourceLength: total
});
}
}
else {
const result = data;
const total = data_size;
resultCallbackFunction({
dataSource: result,
virtualDataSourceLength: total
});
}
} ,
dataFields:this.dataFields
dataFields = [{name:’test’,dataType:’string’}]
https://www.htmlelements.com/angular/demos/grid/filtering-row/
I m following this link.March 10, 2021 at 6:19 am #101588adminKeymasterHi Gourav,
The provided information is unfortunately insufficient to reproduce the reported behavior. Please, provide a full example either in the forum or by email, which demonstrates such behavior with the current version of Smart UI components.
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/March 10, 2021 at 1:59 pm #101590GouravMemberHi Peter,
We are trying to mix Row Filter(https://www.htmlelements.com/demos/grid/filtering-row/) with Server Side Filter (https://www.htmlelements.com/angular/demos/grid/server-side-filtering/) due to which probably we are facing issue. I am not able to attach screen shot in this visual box.
But as a workaround.
Can you suggest, if we customize the filter box for Service Side Filter.
This filter box is very big in size already and when we do this with date, it take so much vertical length that overflow happens and we need to scroll down to select date.
March 11, 2021 at 6:00 pm #101595yavordashewMemberHi Gourav,
Thank you for contacting us again.
Unfortunately still we can reproduce this situation without a code example because its a bit more complex.
However I would advise you to double check if you have set properly the filtering properties if the filter row is not visible.
For your workaround suggestion if the filter box doesn’t suit your needs I can recommend you to check the following demo regarding custom editor in the filtering row.
https://www.htmlelements.com/demos/grid/filtering-row-custom-editor/
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
Smart UI Team
https://www.htmlelements.com/June 30, 2021 at 9:30 am #101956shelkovnikovdvMemberHi Gourav.
After downloading data from the server filters are rendered normally.
But then something is called and makes all cells filter row empty.
This code saves the daylet smartgrid = ... virtualDataSource: function (resultCallbackFunction, details) { ... function refreshFilterPanel() { for (var i = 0; i < smartgrid.columns.length; i++) { smartgrid.columns[i]._filterEditorInitialized = false; }; smartgrid._renderFrozenRows(); } loadFromServer().then( (data) => { resultCallbackFunction({ dataSource: data.items, virtualDataSourceLength: data.totalRecords }); refreshFilterPanel(); .... }) }
Best regards, Dmitry
July 22, 2021 at 3:48 pm #102091mannaii.najmedine1995MemberHello,
I’m facing the same problem, i tried your code but i can’t understand the source of smartgrid variable. Can you help me please?
Best regards.July 22, 2021 at 3:49 pm #102092mannaii.najmedine1995MemberHello,
I’m facing the same problem, i tried your code but i can’t understand the source of smartgrid variable. Can you help me please?
Best regards.July 23, 2021 at 10:38 am #102093yavordashewMemberHi Najmedine Mannaii,
The variable smartgrid is a selector for the SmartGrid component.
For example you can select the SmartGrid like so:let smartgrid = document.querySelector('smart-grid');
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
Smart UI Team
https://www.htmlelements.com/ -
AuthorPosts
- You must be logged in to reply to this topic.