Hi,
I have a grid structured with few columns and a column with checkbox using client template method.
Now i want to read the row values that are selected on an button action click and that has to be passed to the controller for processing the data.
I have mentioned my grid structure below
@(Html.Kendo().Grid<MyMVC.Models.MyModel>()
.Name("MyGrid")
.Columns(columns =>
{
columns.Bound("").Width(25).ClientTemplate("<input type='checkbox' checked='checked' id='rowcheck' ></input>"); -- CheckBox in grid
columns.Bound(p => p.LeaveDate)
columns.Bound(p => p.start);
columns.Bound(p => p.end);
columns.Bound(p => p.reason).Width(400);
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GetLeaveGridData", "StaffManagment"))
.ServerOperation(false)
)
.Selectable(s => s.Mode(GridSelectionMode.Multiple))
.HtmlAttributes(new { @style = "font-family:calibri; font-size:12px" })
.Scrollable()
)
I have done the coding for selecting the key column leave date using the jquery, but i want remining column data to be passed to the controller.
Can anyone help me out how to achieve this. Is this possible or we have to go with some other methodology.
Note : The selected row mentions the row which are checked by the user in the checkbox column.
Thanks
M.Mayilsamy
On Behalf of Jeremy
I have a grid structured with few columns and a column with checkbox using client template method.
Now i want to read the row values that are selected on an button action click and that has to be passed to the controller for processing the data.
I have mentioned my grid structure below
@(Html.Kendo().Grid<MyMVC.Models.MyModel>()
.Name("MyGrid")
.Columns(columns =>
{
columns.Bound("").Width(25).ClientTemplate("<input type='checkbox' checked='checked' id='rowcheck' ></input>"); -- CheckBox in grid
columns.Bound(p => p.LeaveDate)
columns.Bound(p => p.start);
columns.Bound(p => p.end);
columns.Bound(p => p.reason).Width(400);
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GetLeaveGridData", "StaffManagment"))
.ServerOperation(false)
)
.Selectable(s => s.Mode(GridSelectionMode.Multiple))
.HtmlAttributes(new { @style = "font-family:calibri; font-size:12px" })
.Scrollable()
)
I have done the coding for selecting the key column leave date using the jquery, but i want remining column data to be passed to the controller.
Can anyone help me out how to achieve this. Is this possible or we have to go with some other methodology.
Note : The selected row mentions the row which are checked by the user in the checkbox column.
Thanks
M.Mayilsamy
On Behalf of Jeremy