Loading the page, all the user sees are the controls for the query criteria - some date ranges, some drop downs, some text boxes, some checkboxes, etc - and a big search button. When they click on the search button, I create the Kendo grid and in the dataSource/transport/read, I get the criteria from the query criteria controls (in dataSource/transport/read/data) and send it to the server to get the grid of data.
Currently, whenever the user clicks on the search button, the same process is taking place, but that doesn't seem correct to me. Should I be creating the grid each time? Should I try to remove the grid from the DOM, if it exists, whenever I create the grid? Why not just force a reload of the grid, and pull the data from the query criteria again?
What is the recommended Kendo practice for this? Should I be calling $(selector).kendoGrid({...}); whenever the user clicks the search button? If so, is there something I need to do to clean up the DOM before the call to kendoGrid if the grid already exists?
And does this apply to all Kendo widgets?
Thanks in advance.
Currently, whenever the user clicks on the search button, the same process is taking place, but that doesn't seem correct to me. Should I be creating the grid each time? Should I try to remove the grid from the DOM, if it exists, whenever I create the grid? Why not just force a reload of the grid, and pull the data from the query criteria again?
What is the recommended Kendo practice for this? Should I be calling $(selector).kendoGrid({...}); whenever the user clicks the search button? If so, is there something I need to do to clean up the DOM before the call to kendoGrid if the grid already exists?
And does this apply to all Kendo widgets?
Thanks in advance.