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

QueryString With Int Column

Thread ID:

Created:

Updated:

Platform:

Replies:

130754 May 31,2017 06:39 AM Jun 2,2017 12:40 AM ASP.NET MVC 3
loading
Tags: Grid
osama gamal
Asked On May 31, 2017 06:39 AM

     Hello 

     I need to make a child grid using  ODataV4Adaptor , but the problem is my relation field is int and the querystring property generates filter with tolower options

     which cannot work with the int 

     Thanks




Mani Sankar Durai [Syncfusion]
Replied On June 1, 2017 07:46 AM

Hi osama, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and we have prepared a sample based on your requirement that can be downloaded from the below link. 
In this sample we have make the child grid based on filtering the integer column from the parent grid. 
Refer the code example. 
@(Html.EJ().Grid<object>("Editing") 
                .Datasource(ds => { ds.URL("/odata/Employees").Adaptor(AdaptorType.ODataV4Adaptor); }) 
             
                     
  .PageSettings(page => page.PageSize(4)) 
           .SelectedRowIndex(0) 
        .AllowPaging() 
        .Columns(col => 
        { 
            col.Field("EmployeeID").HeaderText("Employee ID").Add();  //integer column 
            col.Field("TerritoryID").HeaderText("Territory ID").Add(); 
 
        }) 
 
                    .ChildGrid(child => 
                    { 
                        child.Datasource(da => da.URL("/odata/Orders").Adaptor(AdaptorType.ODataV4Adaptor)) 
                        .QueryString("EmployeeID")   //passing integer column in QueryString 
                        .AllowPaging() 
                        .Columns(col => 
                        { 
                            ... 
                        }); 
                    }) 
 
) 
[EmployeesController.cs] 
 
NORTHWNDEntities db = new NORTHWNDEntities(); 
        [EnableQuery] 
        public IQueryable<EmployeeTerritory> Get() 
        { 
            return db.EmployeeTerritories; 
        } 
 

Refer the screenshot below that it takes the correct int values to filter and bind the data for childgrid 
 

If you still face the issue please get back to us with the following details. 
1.       Share the screenshot/ video of the issue that you have faced. 
2.       You have mentioned that it passed as tolower option. Could you please send some more details regarding this with exact scenario? 
3.       Share the version details that you are using. 
4.       If possible please reproduce the issue in the above attached sample. 
The provided information will help us to analyze the issue and provide you the response as early as possible. 

Please let us know if you need further assistance. 

Regards, 
Manisankar Durai. 


osama gamal
Replied On June 1, 2017 09:46 AM

Hello Mani

Sorry about that the error was mine 


Mani Sankar Durai [Syncfusion]
Replied On June 2, 2017 12:40 AM

Hi Osama, 

Thanks for the update. 

Please let us know if you need further assistance. 

Regards, 
Manisankar Durai. 


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

;