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

Column Cells Formatted Like Column Header Cell

3 Answers 61 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kenneth
Top achievements
Rank 1
Kenneth asked on 17 May 2011, 07:26 PM
I would like to format the cells in a GridView column similar to the format of the column header cell.  For example, I would like the first cell in each row to look like it is a header cell.

Is there a way to do this?

Thanks.


Ken...

3 Answers, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 20 May 2011, 02:40 PM
Hello Kenneth,

Thank you for your question.

You can use the CellFormatting event of RadGridView to customize the cell appearance. Please let me know if you have additional questions.

Best regards,
Alexander
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
0
Kenneth
Top achievements
Rank 1
answered on 20 May 2011, 02:52 PM
Yes, I would like to see an example.  I have tried using the CellFormatting event, but I cannot seem to get the column header cells in order to get the formatting from them to use on the cell that I want to look similar.

Thanks.


Ken...
0
Alexander
Telerik team
answered on 25 May 2011, 03:07 PM
Hello Kenneth,

I agree there is no straight way to copy the styles of a header cell and apply them to a data cell of RadGridView. As the visual properties of the header and data rows are different, even copy of all visual settings of the header cell will not provide the same appearance to the data cell.

You can use the Visual Style Builder tool to customize the theme you use and style the RadGridView data cells. Considering your example for different style of the first cell in each row, you will still need to customize the appearance of the control in run time using formatting events.

Best regards,
Alexander
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
Tags
GridView
Asked by
Kenneth
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Kenneth
Top achievements
Rank 1
Share this question
or