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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem on retrieving grid with datepicker

Thread ID:





142279 Jan 24,2019 05:04 PM UTC Jan 25,2019 12:02 PM UTC ASP.NET MVC - EJ 2 1
Tags: Grid
Kenneth Tang
Asked On January 24, 2019 05:04 PM UTC

Dear all,

We are using a datepicker value to retrieve and refresh the grid, when we change the query parma in javascript, we found that the 1st pama can't pass to code behind for retrieving. Please help and advance how to solve, thank a lot.

Attached please find the code that we used.


Attachment: Archive_964807e.zip

Pavithra Subramaniyam [Syncfusion]
Replied On January 25, 2019 12:02 PM UTC

Hi Kenneth, 
Greetings from Syncfusion. 
We have checked your query and in your code you are overriding the grid query property with second parameter(‘toDate’) so the first parameter(‘fromDate’) is not changed. So We suggest to use the below way to achieve your requirement. 
    var HourlyChange = function (args) { 
        if (args.event && args.event.target.classList.contains("e-apply")) { 
             .  .  . 
            var gridObj = document.getElementById("gHourly").ej2_instances[0]; 
            gridObj.query = new ej.data.Query().addParams('fromDate', startDate).addParams('toDate', endDate); // send the query to  server 
Please contact us if you need any further assistance. 
Pavithra S. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon