I have a comboBox called clientCCBox, I need a javascript that retrieves the selected option value, wich will be the client id, and then passes it on the kendo grid datasource read property as follow:
<kendo:dataSource-transport-read url="/read.html?*clientID*"/>
I’ve been trying to use this js snippet to recover the selected value; the document write is there to visually see if it actually retrieved the value, but it displays nothing. How would I once I get the clientID use it in HTML?
<script>
function onSelect(e){
var clientId = clientCCBox.value();
document.write(clienteId);
}
</script>
If I do manage to pass clientID on the querystring, the following code on the controller would return a list and populate the grid right?
@RequestMapping(value = "/read.html*")
public @ResponseBody List<Workers> read(HttpServletRequest request) {
return workerDAO.listWorker(Integer.parseInt(request.getQueryString()));
}
You can define your additional parameters using
parameterMapattribute inkendo:dataSource-transporttag.Example:
Where
additionalParametersis:Here, I would be loading data from the following url
/ListBeer?id=xyzwherexyzis the value oftheId.You can also send more than one parameter: