This question is locked. New answers and comments are not allowed.
Hi,
I'm pretty new to MVC 4 and Razor (which is what we are now using at work) and I am just trying to make a little modal popup / partial view that contains a Telerik Grid Control with checkboxes and data. I can load the grid all fine and dandy, but have no idea HOW to get the list of selected Id's OUT of the grid or how the Server Side example on the website actually calls the proper controller action and passes in a list of int[] values?
What I want to do is either return this list of ID's to my parent page and save them in the parent's model or some other way of storing them to use for the parent Save.
Basically I set my grid up as per the example, but HOW do I get that controller bull jive to work?
Any help would be much appreciated :) Thanks.
I'm pretty new to MVC 4 and Razor (which is what we are now using at work) and I am just trying to make a little modal popup / partial view that contains a Telerik Grid Control with checkboxes and data. I can load the grid all fine and dandy, but have no idea HOW to get the list of selected Id's OUT of the grid or how the Server Side example on the website actually calls the proper controller action and passes in a list of int[] values?
What I want to do is either return this list of ID's to my parent page and save them in the parent's model or some other way of storing them to use for the parent Save.
Basically I set my grid up as per the example, but HOW do I get that controller bull jive to work?
Any help would be much appreciated :) Thanks.
@model MDL.ViewModels.
InstrumentSelectViewModel
@{ Html.BeginForm(); @Html.ValidationSummary(true) @(Html.Telerik().Grid<MDL.Models.Instrument>(Model.Instruments) .Name("Grid") .Columns(columns => { columns.Template(@<text> <input name="checkedRecords" type="checkbox" value="@item.InstrumentId" title="checkedRecords" @if (Model.SelectedInstrumentIds.Contains(item.InstrumentId)) { <text>checked="checked"</text> } /> </text>).Title("").Width(36).HtmlAttributes(new { style = "text-align:center" }); columns.Bound(model => model.InstrumentId).Title("Id"); columns.Bound(model => model.TagName).Title("Tag Name"); columns.Bound(model => model.TagDescription).Title("Tag Description"); columns.Bound(model => model.EngUnits).Title("End Units"); }).Sortable().Filterable()) <p> <button type="submit" class="t-button t-state-default">Display checked orders</button> </p> }