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. Image for the cookie policy date

Foreignkey column with same text don't execute filter

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

2 Replies

SA Saravanan Arunachalam Syncfusion Team October 23, 2015 12:44 PM UTC


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.



SA Saravanan Arunachalam Syncfusion Team October 23, 2015 01:07 PM UTC

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.


Loader.
Live Chat Icon For mobile
Up arrow icon