Hi, I'm currently trying to filter a grid using an external component like the dropdown menu. I've used the instructions found in this form thread.
How would I pass the name of the drop down menu as well as the id or text data associated with the selection.
For example here is my current code:
Javascript
<script>
var
menuName
var
menuItem
function
additionalData(e) {
return
{
item: menuName +
" "
+ menuItem
}
}
function
onChange(e) {
//What would I put here to get the name or id of the dropdown? id, name, &ct.toString() do not work
menuName =
this
.name()
menuItem =
this
.text()
var
grid = $(
"#analogGrid"
).data(
"kendoGrid"
)
grid.dataSource.read()
}
</script>
Grid HTMLHelper
//...
.Read(read => read.Action(
"Analogs_ReadAsync"
,
"Analogs"
).Data(
"additionalData"
))
//...
Controller Action
public
async Task<JsonResult> Analogs_ReadAsync([DataSourceRequest]DataSourceRequest request,
string
item) {...}