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

Customize Header with HtmlViewDefinition

1 Answer 41 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Chuck Thompson
Top achievements
Rank 1
Chuck Thompson asked on 30 Oct 2009, 05:48 PM
I my application I have a need to basically merge 2 rows.
So I am using the HtmlViewDefinition to do so.
It all is working great but I want to remove some of the column headers as they are all kind of duplicate(by design) per the data.

The view istructured like this:
 HtmlViewDefinition view = new HtmlViewDefinition();  
 
              view.RowTemplate.Rows.Add(new RowDefinition());  
              view.RowTemplate.Rows.Add(new RowDefinition());  
              view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Code_V1"));  
              view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Name_V1"));  
              view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Code_V2"));  
              view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Name_V2"));  
 
              this.gvMembers.ViewDefinition = view; 

So the header basically looks like this:

Code_V1        Name_V1
Code_V2        Name_V2

But I want it to look like this:
Code        Name


So I would like to remove the second "row" of the header". 
Or if that is not possible, can I make the height be smaller to basically hide the second row. 
I am not usre how to do either. 
Any ideas os suggestions would be appreciated..

--Chuck

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 04 Nov 2009, 09:59 AM
Hi Chuck,

Currently this is not possible with HtmlViewDefinition. I added it as a feature request and we will consider the scenario when planning our next release. Should you have any further questions, don't hesitate to ask.

Regards,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Chuck Thompson
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or