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

Hide all headers in RadGrid (when using ItemTemplate)

3 Answers 2058 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cartoon Head
Top achievements
Rank 1
Cartoon Head asked on 01 Jul 2010, 02:24 PM
I am using a RadGrid to list a bunch of records using an ItemTemplate format, but want to hide the fact that it is actually a grid.

Right now, all the headers are visible, including those for columns not being included in the ItemTemplate.

I'm sure I am just missing a simple setting, but I can't find it.  How do I hide the headers altogether?

3 Answers, 1 is accepted

Sort by
0
Cartoon Head
Top achievements
Rank 1
answered on 01 Jul 2010, 02:42 PM
Never mind.  I found it:

    <MasterTableView   
            DataSourceID="sqlIdeal"   
                ShowHeader="false" 
                TableLayout="Fixed" > 
 

I hate it when it's that obvious!
0
Pavlina
Telerik team
answered on 01 Jul 2010, 02:55 PM
Hello Cartoon,

You can hide or show the header element using the grid's ShowHeader property. For more information about headers, see Using columns.

Best wishes,
Pavlina
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
Waseem
Top achievements
Rank 1
answered on 26 Aug 2013, 07:56 PM
How to hide header on specific column in Radgrid in javascript?
I don't want to use table.hideColumn(column.get_element().cellIndex);

 function PrintRadGrid() {
                var radGrid = $find('<%= RadGrid1.ClientID %>');
                var table = radGrid.get_masterTableView();
                var column = table.getColumnByUniqueName("CkboxDelKey");
                
                var masterTable = $find("<%=RadGrid1.ClientID%>").get_masterTableView();
                for (var row = 0; row < masterTable.get_dataItems().length; row++) {
                    var str = masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[row], "CkboxDelKey").innerHTML;
                    if (str.indexOf("<nobr>") != -1) {
                        masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[row], "CkboxDelKey").style.display = 'none';
                    }
                }

//hide header code
//Code here

}
Tags
Grid
Asked by
Cartoon Head
Top achievements
Rank 1
Answers by
Cartoon Head
Top achievements
Rank 1
Pavlina
Telerik team
Waseem
Top achievements
Rank 1
Share this question
or