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

Problem on retrieving grid with datepicker

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

1 Reply

PS Pavithra Subramaniyam Syncfusion Team 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. 

Live Chat Icon For mobile
Up arrow icon