We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Filtering, Search, Checkbox and Sorting bugs Version 12.4.0.34

Thread ID:

Created:

Updated:

Platform:

Replies:

118724 Apr 3,2015 05:39 PM UTC Apr 23,2015 01:54 PM UTC ASP.NET MVC 5
loading
Tags: Grid
David Galeano
Asked On April 3, 2015 05:39 PM UTC

Filtering, Search and Sorting not working when using URL Adaptor. 
When trying to filter, Search or Sort, the URL action fires repopulating the grid from the my model get method. Therefore nothing works except paging and editing.
I am forced to use URL Adaptor as is the only way to perform batch build. Tried other Adaptor as a Datasource but the batch edit action doesn't fire:

.Datasource(ds => ds.URL("BindGrid").BatchURL("BatchUpdate").Adaptor(AdaptorType.UrlAdaptor))

I have tried catching the action using the client event ActionBegin and then refresh the grid locally but i cant make it work.

Also, I have an editable Boolean(checkbox) column that gives me a javascript error when the value is changed. It also disappears and when I attempt to save,  the value changed is not picked up:

col.Field("bExclude").HeaderText("Exclude").Width(100).EditType(EditingType.Boolean).Add();

I have attached my view and the controller files. If you can help me find a solution I would appreciate it
The easiest solution is if I can use the batch build method in another Adaptor where it doesn't break the other default functionality.

Attachment: files_5ce46976.zip

Mohammed Farook J [Syncfusion]
Replied On April 6, 2015 01:24 PM UTC


Hi David,

Thanks for using Syncfusion products.

Based your requirement we have created a sample and the same can be downloaded from following link:

Sample: Server_side_sorting.zip

Please refer the Knowledge base documentation for more information regarding the server side operations using the url adaptor in the following link.

Documentation link: http://www.syncfusion.com/kb/4300/server-side-api-for-datamanager-operations

Please let us know If you have any queries.

Regards,

J.Mohammed Farook



David Galeano
Replied On April 21, 2015 04:36 PM UTC

Thank you,

I am having trouble getting the DataSource count after it applies the filtering. I need the count to update the paging so it shows the right number of pages once is filtered. 
My Get Data method only gets all of the records so when Applying filtering, the paging shows empty pages.
Can you please provide a working example of this?
I am using this code snippet:
 [WebMethod]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
        public static object Data(Syncfusion.JavaScript.DataManager value)
        {
            IEnumerable Data = OrderRepository.GetAllRecords();
            int count = Data.AsQueryable().Count();
            Syncfusion.JavaScript.DataSources.DataOperations operation = new Syncfusion.JavaScript.DataSources.DataOperations();
            Data = operation.Execute(Data, value);
            return new { result = Data, count = count };
        }     

Sellappandi Ramu [Syncfusion]
Replied On April 22, 2015 01:22 PM UTC

Hi David,

Sorry about the inconvenience caused.

We have analyzed your query and found that you have stored the count of DataSource, before performing the server side operation and returning that count. Hence you have got the total count of the data base.

Based on your requirement we have created a sample by using server side data operations and get the count after performing the data operations. The sample can be downloaded from the following link location.

Sample Link: http://www.syncfusion.com/downloads/support/forum/118724/Sample_1187241752562504.zip

Please refer the following code snippet for DataOperations at server side.

public ActionResult DataSource(Syncfusion.JavaScript.DataManager dm)

{

IEnumerable Data = OrderRepository.GetAllRecords();

DataResult result = new DataResult();

DataOperations operation = new DataOperations();

IEnumerable res = operation.Execute(Data, dm);

result.result = res;

result.count = res.AsQueryable().Count();

return Json(result, JsonRequestBehavior.AllowGet);

}

For your reference we have also attached the screenshot of getting the count after performing the filter operation.

Please try the above sample and let us know if it helps.

If we misunderstood your query please get back to us with more information regarding your issue along with the issue reproducing sample. It will help us to provide you with prompt solution.

Regards,

Sellappandi R


David Galeano
Replied On April 22, 2015 02:58 PM UTC

Ran the project with the assemblies I am using and the count still is wrong. 
It returns the number of the page size. 
By just running the project without filtering there are 830 records in the data source but when the grid loads, the count is 10 which is equivalent to the page size. 
Therefore, it shows only one page of 10 records on the grid without even filtering applied.
The count should update against the amount of records filtered. It works fine when the amount of filtered records is less than 10 which is the page size.
Not sure if the assemblies I am using have anything to do with it.  I have been working with assemblies for version  12.4.0.34.

      <add assembly="Syncfusion.Core, Version=12.4450.0.34, Culture=neutral, PublicKeyToken=632609B4D040F6B4" />
        <add assembly="Syncfusion.Compression.Base, Version=12.4450.0.34, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.EJ, Version=12.4450.0.34, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.EJ.Mvc,Version=12.4500.0.34, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
        <add assembly="Syncfusion.Linq.Base, Version=12.4450.0.34, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />

I have attached screenshots when running the sample without filtering.





Attachment: screenshots_4e41751e.zip

Sellappandi Ramu [Syncfusion]
Replied On April 23, 2015 01:54 PM UTC

Hi David,

We regret for the inconvenience caused.

We have created a sample by using the PerformWhereFilter method to get the count of the filtered records in server side. The sample can be downloaded from following link location:

Sample Link: http://www.syncfusion.com/downloads/support/forum/118724/Samples_118724-194910031.zip

In the above sample we have used the PerformWhereFilter to perform the server side filter operation and we stored filtered count in result.count. Please refer the following code snippet.

public ActionResult DataSource(Syncfusion.JavaScript.DataManager dm)

{

IEnumerable Data = OrderRepository.GetAllRecords();

DataResult result = new DataResult();

DataOperations operation = new DataOperations();

if(dm.Where != null)

Data=operation.PerformWhereFilter(Data, dm.Where, "");

IEnumerable res = operation.Execute(Data, dm);

result.result = res;

result.count = Data.AsQueryable().Count();

return Json(result, JsonRequestBehavior.AllowGet);
}


For your convenience we have attached screen shot in below for the output after filtered in verified column.

Please try the above sample and get back to us if you need any further assistance.

Regards,
Sellappandi R

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;