I have a grid and I added a custom button, I want that button to call a function in my controller and pass the selected value in my dropdownlist. I can get it to call the controller correctly but I can't get the additional data I need to be sent as well.
SelectedDayendCycle is a javascript function that will return the selected item from the dropdownlist but it isn't recognized.
I was hoping I could do the same thing I do in the grid.
.ToolBar(commands => commands.Custom().HtmlAttributes(new { id = "SendEmailStatements" })
.HtmlAttributes(new { @CLASS = "sendBtn" })
.Text("Send")
.Action("SendBuyerEmailStatements", "Home", new { DayendCycle = SelectedDayendCycle})
)
I was hoping I could do the same thing I do in the grid.
.Read(read => read.Action("BuyerEmailStatementsGrid_Read", "Home").Data("SelectedDayendCycle")