Last active
August 29, 2015 14:06
-
-
Save dearcodes/b745ed84b78181ccd514 to your computer and use it in GitHub Desktop.
Ejemplo de como obtener la propiedad de un row activo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model object | |
@(Html.Kendo().DropDownListFor(m => m) | |
.DataValueField("ListStatusId") | |
.DataTextField("ListStatusName") | |
.DataSource(d => | |
//get the additional data using function in the main view | |
d.Read(r => r.Action("GetStatusList", "Home").Data("getParentID()")) | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getParentID() { | |
var row = $(event.srcElement).closest("tr"); | |
var grid = $(event.srcElement).closest("[data-role=grid]").data("kendoGrid"); | |
var dataItem = grid.dataItem(row); | |
//where the OrderID is the model ID | |
return { statusId: dataItem.StatusId } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment