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

Column Header with two text boxes

1 Answer 116 Views
GridView
This is a migrated thread and some comments may be shown as answers.
nduru
Top achievements
Rank 1
nduru asked on 22 Nov 2010, 08:29 AM

Can I put two text boxes in each column header.

I need to have a row below the name to display the units for each column.

If so how to do it programatically.

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 22 Nov 2010, 08:49 AM
Hi nduru,

The Header property of RadGridView is of type Object, so you can put anything in it.
For example you can place a stackpanel which contains two textboxes in it:

StackPanel sp = new StackPanel();
TextBox tb = new TextBox() { Text = "first tb" };
TextBox tb2 = new TextBox() { Text = "second tb" };
 
sp.Children.Add(tb);
sp.Children.Add(tb2);
 
this.clubsGrid.Columns[0].Header = sp;

Hope this helps.

Best wishes,
Veselin Vasilev
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
GridView
Asked by
nduru
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or