Click here to Skip to main content
15,910,661 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
<div id="gridContent">
@grid.GetHtml(tableStyle: "webGrid",
headerStyle: "header",
alternatingRowStyle: "alt",
selectedRowStyle: "select",
columns: grid.Columns(
grid.Column("Name", "Name", style: "description"),
grid.Column("DomainName", "Domain Name",style:"hide")
</div>

XML
<style type="text/css">
    .hide {display:none;}
<style>

Like this I am trying to hide the column but column header not able to hide how can I hide the column header in this


So finally I want to hide DomianName column how can I?
Posted

 
Share this answer
 
Comments
Balu Balaji 8-Jan-14 1:28am    
I think that will work on WPF in MVC Razor how can I?
write down column index in eq() and it will work put this in document.ready() function

JavaScript
$('.grid table thead tr th:eq(8)').hide();
 
Share this answer
 
C#
grid.Column("FriendlyId", style:"hidecol",header:"")
Insted of using like this you have to use Like bellow manner I tried It will work successfully.
grid.Column(format: @<input type="hidden" name="FriendlyId" value="@item.FriendlyId" />)
 
Share this answer
 

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