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.

Foreignkey column with same text don't execute filter

Thread ID:

Created:

Updated:

Platform:

Replies:

120857 Oct 22,2015 04:45 PM Oct 23,2015 09:07 AM JavaScript 2
loading
Tags: ejGrid
Cristiano Souza Silva
Asked On October 22, 2015 04:45 PM

Hi

I have a column with foreignkey. 
My foreignkey list has three itens with same text, but differente Id.

When I tried filter with the text, ejGrid don't execute as I expected. If you look at picture_3, nothing happen after filter executed. It problem just happen when I have more then one value with same text on foreign key list.


picture_1 - SQL SERVER with my fields with same Name
picture_2 - Execute filter with Name exactly as a stored on sql server.
picture_3 - Filter result
picture_4 - Column definition
picture_5 - Values on foreignkey list.


I don't know if this problem happen on excel filterType, but I need to use menu filterType. 

If it's a bug, please try to fix on excel filterType too. 

Thank you.

Attachment: support_29aa2456.zip

Saravanan Arunachalam [Syncfusion]
Replied On October 23, 2015 08:44 AM


Hi Cristiano,

Thanks for contacting Syncfusion Support.

We have analyzed the screenshots and we are sorry to let you know that we are unable to reproduce the reported issue.

We suspect the cause of the issue may be you have missed to perform the “DataOperation” on the server side. In the URL Adaptor, the “Ajax” post back action is performed for each Grid operation like filtering and sorting. So, return the datasource after performing “DataOperation” on the server side. Please refer to the following code example and screenshot.

[View]

var dataManger = ej.DataManager({

            url: "/Grid/DataSource",

            adaptor: "UrlAdaptor"

        });

[Controller]

public ActionResult DataSource(DataManager dm)

        {

            var DataSource = OrderRepository.GetAllRecords();

            DataResult result = new DataResult();

            DataOperations operation = new DataOperations();

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

            result.result = res;

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

            return Json(result, JsonRequestBehavior.AllowGet);

        }




We have created the sample that can be downloaded from the below link.

http://www.syncfusion.com/downloads/support/forum/120857/ze/URLadaptor_for_JS-2052679799

If still you are facing the issue, could you please share the following details?

1.     Share your controller page code

2.     Share your console page with call stack if any exception or script error throws?

3.     If possible please rreproduce the issue in the above sample

So that we could provide you response as early as possible?

Regards,

Saravanan A.


Saravanan Arunachalam [Syncfusion]
Replied On October 23, 2015 09:07 AM

Hi Cristiano,

Thanks for contacting Syncfusion Support.

 Please ignore the previous update.

We have analyzed the screenshots and we are sorry to let you know that we are unable to reproduce the reported issue.

We suspect the cause of the issue may be you have missed to perform the “DataOperation” on the server side. In the URL Adaptor, the “Ajax” post back action is performed for each Grid operation like filtering and sorting. So, return the datasource after performing “DataOperation” on the server side. Please refer to the following code example and screenshot.

[View]

var dataManger = ej.DataManager({

            url: "/Grid/DataSource",

            adaptor: "UrlAdaptor"

        });

[Controller]

public ActionResult DataSource(DataManager dm)

        {

           IEnumerable DataSource = OrderRepository.GetAllRecords();

            DataResult result = new DataResult();

            DataOperations operation = new DataOperations();

            result.result = DataSource;

            if (dm.Where != null)

            {

                result.result = operation.PerformWhereFilter(result.result, dm.Where, "and");

            }

            if (dm.Sorted != null)

            {

                result.result = operation.PerformSorting(result.result, dm.Sorted);

            }

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

            if (dm.Skip > 0)

                result.result = operation.PerformSkip(result.result, dm.Skip);


            if (dm.Take > 0)

                result.result = operation.PerformTake(result.result, dm.Take);


            return Json(result, JsonRequestBehavior.AllowGet);

        }




We have created the sample that can be downloaded from the below link.

http://www.syncfusion.com/downloads/support/forum/120857/ze/URLadaptor_for_JS-961480366

If still you are facing the issue, could you please share the following details?

1.     Share your controller page code

2.     Share your console page with call stack if any exception or script error throws?

3.     If possible please rreproduce the issue in the above sample

So that we could provide you response as early as possible?

Regards,

Saravanan A.


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.

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.

;