i have create one Webgrid which used to display the data into Tabular form but i want to add the checkbox in Header part of webgrid by using this checkbox i want to perorm the operation check all other checkbox into webgrid and perform the ACTIVE And Delete operation..so please help me how to create it ..below my code of Webgrid:
<div id="mygrid">
@grid.GetHtml(tableStyle: "gridTable",
headerStyle: "gridHead",
footerStyle: "gridFooter",
rowStyle: "gridRow",
alternatingRowStyle: "gridAltRow",
columns: grid.Columns(
grid.Column(header: "",format: @<text><input type="checkbox" name="chkactive[]" value="@item.User_id" /></text>),
grid.Column("User_Id"),
grid.Column("Name"),
grid.Column("Username"),
grid.Column("Fb_Id"),
grid.Column("User_image", format: @<text><img src="@Url.Content(@item.Image_path)" height="30px" width="50px" alt="noimage"/></text>),
grid.Column("Email"),
grid.Column("Gender"),
grid.Column(header: "Status", format: @<text>
@if (@item.Is_active == true)
{
<a href="@Url.Action("UserStatus", "Admin", new { id = @item.User_id })"><img src="../../images/Active.png"/></a>
}
else
{
<a href="@Url.Action("UserStatus", "Admin", new { id = @item.User_id })"><img src="../../images/Deactive.png"/></a> }</text>),
grid.Column(header: "Edit",
format: @<text><a href="@Url.Action("EditeUser", "Admin", new { id = @item.User_id })"><img src="../../images/icons/editor.png" /></a></text>),
grid.Column(header: "Delete",
format: @<text><a href="@Url.Action("DeleteUser", "Admin", new { id = @item.User_id })"><img src="../../images/icons/trash.png"/></a></text>)))
</div>
please give me some format to display checkbox into Header .. when i create checkbox in to header error is display which is best overloaded metho....? and we also know that header is accept only string type data not to any element..! please give me hint to perform to this operation ok..it;s argent..?