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

[Solved] Custom grid header row with combo boxes

4 Answers 116 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 2
Andrew asked on 05 Jun 2008, 11:39 AM
I want to create a row of combo boxes (one for each column) that is above the other rows of data in the Grid. The row needs to persist across pages.

The grid I use uses paging and horizontal scrolling. It is also bound to a datasource who's structure can change from one execution to the next. I use advanced data binding through the OnNeedDataSource event. I bind to a DataTable object.

Each combo box will hold the same data, and I will custom handle the logic of the cb's postback (as long as I can reference the value of  the header, or index for that column).

Can you suggest a way of implementing this?

I'm still new to the Telerik controls, so please help me out. Code samples would be appreciated.

4 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 09 Jun 2008, 07:05 AM
Hello Andrew,

You can use the commandItem template to achieve the desired functionality.
I hope this is a feasible option for you.

Best wishes,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Andrew
Top achievements
Rank 2
answered on 09 Jun 2008, 07:13 AM
If I place a series of combo boxes, one for each column in the grid, into the command item template, is it possible to have the combo boxes sized to the width of the columns (if the columns are auto sized)?

If client resizing of the columns is turned on, is it possible to have the combo boxes reflect those resize changes?
0
Yavor
Telerik team
answered on 10 Jun 2008, 12:26 PM
Hi Andrew,

There are two options to address this.
First, you can use template columns, and nest the relevant comboboxes in the header templates. Alternatively, you can nest the comboxes in a table in the command item, which would give you a chance to size it accordingly.

0
Princy
Top achievements
Rank 2
answered on 11 Jun 2008, 10:15 AM
Hi Andrew,

You can also refer the following links.

Customizing with GridTemplateColumn
span cells in grid over multiple positions

Princy.
Tags
Grid
Asked by
Andrew
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Andrew
Top achievements
Rank 2
Princy
Top achievements
Rank 2
Share this question
or