Using dropdown list selection(Application Name) I am updating my web grid here the problem is while returning from controller like this
return PartialView("_CreateRoles", objPermList);
My dropdown list also getting updated automatically but I don't want this how can I achieve this can you give me any sample example
COntroller
[MustBeLoggedIn, Filters.Compress]
public ActionResult GetPermissionByAppName(string Appname)
{
//some coding
return PartialView("_CreateRoles", objPermList);
}
VIEW
<select id="AppList" onchange="AJAXCall_Fun_LinkRole(GetSelected())">
@foreach (var AppName in Model.ApplicationList)
{
<option id="hid_AppId">@AppName.AppName</option>
}
</select>
<div id="gridcal" style="padding: 20px;">
WebGrid grid = new WebGrid(Model.Permission, rowsPerPage: 20, selectionFieldName: "selectedRow", ajaxUpdateContainerId: "gridcal");
grid.Pager(WebGridPagerModes.NextPrevious);}
@grid.GetHtml(
tableStyle: "webgrid-table",
headerStyle: "webgrid-header",
footerStyle: "webgrid-footer",
alternatingRowStyle: "webgrid-alternating-row",
selectedRowStyle: "webgrid-selected-row",
rowStyle: "webgrid-row-style",
columns:
grid.Columns(
grid.Column("PermName","Permision Name",style: "colWidth"),
grid.Column(format: @<text><input type="image" onclick="AJAXCall_Fun_LinkPermission('@item.PermName ');" src="~/Images/icon-plus.png" name="image" width="9" height="9" /></text>)
))