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
close icon

QueryString With Int Column

     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




3 Replies

MS Mani Sankar Durai Syncfusion Team June 1, 2017 11:46 AM UTC

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. 



OG osama gamal June 1, 2017 01:46 PM UTC

Hello Mani

Sorry about that the error was mine 



MS Mani Sankar Durai Syncfusion Team June 2, 2017 04:40 AM UTC

Hi Osama, 

Thanks for the update. 

Please let us know if you need further assistance. 

Regards, 
Manisankar Durai. 


Loader.
Live Chat Icon For mobile
Up arrow icon