Display Search with enable persistence on grid

Hi. 

I have a grid that has persistence on and also have the search facility. 

The issue i am facing is that when i search for something, when leaving the page and returning to the page the filtered search list has peristed, however the typed words in the search bar are no longer present. 

I am wondering if it is something i am missing within my code, either Razor or Controller, or if this is something that cannot be done. 

I have attached a copy of the Grid and a copy of my controller. 

Cheers

Paul 

Attachment: GridFilterScript_febfc167.zip

2 Replies

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team February 8, 2018 05:11 PM UTC

Hi Paul, 

Thanks for contacting Syncfusion Support. 

We have checked your query and prepared sample as per your code example but we are unable to reproduce your reported problem at our end.  Please refer to the sample Link:- 

https://www.syncfusion.com/downloads/support/forum/135822/ze/Sample145862_(2)-324358702 

Please refer to the screenshot:- 
 

Please refer to the Video Demo:- 


We need some additional information to find the cause of the issue.  Please share us the following details. 

1. Share us the screenshot/Video Demo as like given above. 

2. If possible provide an issue reproducing sample or hosted link or  

3. Exact scenario you are facing the issue. 

The provided information will be helpful to provide you solution as early as possible. 

Regards, 

Farveen sulthana T 



FS Farveen Sulthana Thameeztheen Basha Syncfusion Team February 8, 2018 05:12 PM UTC

Hi Trinh, 

Query # 1 :-what I need is combine 2 columns into 1:- 
 
You can merge two columns into single column by using MergeCellInfo event of the Grid. In this event you can combine two columns by using colMerge functions available on the event. Also you can combine the headers of the column using mergeHeaderCellInfo event of the Grid. 
 
 Please refer to the documentation and Online Demo Link:- 
 
 
 
Query #2 :-  how can I check the existing of the image then show the default image if there is no image found, 
 
You can simply add  onerror="this.src='https://src1/error-img.jpg';" to all your image tags, if there is no image, it will show your error default image. 
Please refer to the code example:- 
 
<script type="text/x-jsrender" id="columnTemplate"> 
    <img style="width: 75px; height: 70px" src="../content/images/grid/Employees/{{:EmployeeID}}.png" alt="{{: EmployeeID }}" onerror="this.src='../content/images/grid/Employees/Spicy.png';" /> 
</script> 

Please get back to us if you need any further assistance. 

Regards, 

Farveen sulthana T 


Loader.
Up arrow icon