This is a migrated thread and some comments may be shown as answers.

Grid header - how turn off?

7 Answers 163 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
grego
Top achievements
Rank 1
grego asked on 12 Apr 2010, 04:05 PM
How is the grid header turned off? The footer has .Footer(false) but what about for the header?

7 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 13 Apr 2010, 08:43 AM
Hi grego,

There is currently no public API for hiding the grid header. This means that in order to hide it you should modify the source code. Just remove the method invocation of the WriteHeader method inside Grid.cs.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Helene Dumas
Top achievements
Rank 1
answered on 26 May 2010, 07:47 PM
I need to have the header turned off for one of the grid... I do not want it to affect all the grids in the solution.
If I do what you say and change the file grid.cs, will it affect all the grids in the solution??
And when I make the change in the file, do I do like the footer and insert the line .header(false)??
0
Craig
Top achievements
Rank 1
answered on 21 Oct 2010, 09:50 PM
I had this same problem and solved it by using JQuery.  I had one page with two grids, and I did not want to display the column headers.  Adding this bit of JQuery solved the problem for me.

 

 

<script type="text/javascript" language="javascript">

 

$(

 

function () {

 

$(

 

'.t-header').hide();

 

});

 

 

</script>

 

0
Helene Dumas
Top achievements
Rank 1
answered on 28 Oct 2010, 06:51 PM
Thank you for your reply...
I have tried your solution, but for some reason, the grid now says that there are "no records to display".
Is there something I am missing that I should add??
0
Nathaniel
Top achievements
Rank 1
answered on 24 Nov 2010, 07:44 PM
Using the bits from this thread I came up with this solution. I have a grid of issues, with a sub grid of attachments. My grids are ajax bound. I added a class and client event to my sub grid:
.HtmlAttributes(new { @class = "attachment-grid" })
.ClientEvents(events => events.OnLoad("HideHeader"))

Then the javascript function looks like this:
<script type="text/javascript">
  function HideHeader()
  
    $('.attachment-grid .t-header').hide(); 
  };
</script>

0
Mario
Top achievements
Rank 2
answered on 26 Nov 2010, 09:34 AM
You could hide it with css...
0
Amos
Top achievements
Rank 1
answered on 03 Oct 2011, 08:45 PM
Grid().HtmlAttributes(new { @class = "gridClass" })
.gridClass .t-header
{     displaynone; }
Tags
Grid
Asked by
grego
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Helene Dumas
Top achievements
Rank 1
Craig
Top achievements
Rank 1
Nathaniel
Top achievements
Rank 1
Mario
Top achievements
Rank 2
Amos
Top achievements
Rank 1
Share this question
or