Dec 09, 2018, 2:26 PM
Pass cell of Selection row in Grid via ExtraParms
Hello Masters
i have a Grid that display some data , i wanna pass id to HttpPost action when user select row and then click the Button.
i wrote this code for button in cshtml
meanwhile user Select Row, not Cell;
Thanks
i have a Grid that display some data , i wanna pass id to HttpPost action when user select row and then click the Button.
i wrote this code for button in cshtml
@(Html.X().Button()
.Text("Update")
.IconCls("SaveAndUpdat")
.Scale(ButtonScale.Large)
.FormBind(true)
.Cls("numpad-btn two")
.EnableToggle(false)
.MarginSpec("7")
.Handler("App." + Wind + ".show(this);")
.DirectEvents(de =>
{
de.Click.Url = Url.Action("InsertUpdate", "Role",new {Area="Role"});
de.Click.ExtraParams.Add(new Parameter
{
Name = "roleId",
Value = "App.GridPanel1.selModel.getSelection().????", //columns[0].val()
Mode = ParameterMode.Raw,
Encode = true
});
})
my code in controller is correct and Set up manually work App.GridPanel1.store.getAt(1).data['Id']
but i dont Know how to set selected roleid in grid to ExtraParms.meanwhile user Select Row, not Cell;
Thanks
Last edited by orpheus; Dec 09, 2018 at 4:07 PM.