Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
XML
<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>)
              ))
Posted
Updated 22-Dec-13 19:02pm
v5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900