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

Row Header Style

4 Answers 142 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Subash
Top achievements
Rank 1
Subash asked on 14 Feb 2013, 08:27 AM
Hi,

I need to apply telerik gidview column header's default style to the row header also. I need to assign this dynamically through coding.

I have attached the sample image also.

How can i acheive it.

Thanks,
Subash

4 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 14 Feb 2013, 10:16 AM
Hi Subash,

I am not sure that I understand your request as the header's default style is the same as the style for the row headers on your image.

Do you mean that you would like to Style the "D, E, F, G ... " parts. If so, may I ask you how have you defined them?
 

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Subash
Top achievements
Rank 1
answered on 15 Feb 2013, 04:22 AM
Hi Didie,

Thanks for your reply.

yes i want to style the "D,E,F,G.." parts similar to the "IF,VVS1...". I have defined them dynamically through code. i have given auto generate columns as true and added these row header part as an first column values.

Thanks,
Subash
0
Dimitrina
Telerik team
answered on 15 Feb 2013, 04:31 PM
Hello Subash,

You could subscribe for the AutoGeneratingColumn event and assign a proper CellStyle for the first column (after identifying it via its unique name). This Style will be applied for all the cells from this column.

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Subash
Top achievements
Rank 1
answered on 18 Feb 2013, 04:33 AM
Hi Didie,

I tried to implement the following code,

 

 

private void _discountTable_AutoGeneratingColumn_1(object sender, GridViewAutoGeneratingColumnEventArgs e)

 

{

_discountTable.Columns[0].Style = _discountTable.HeaderRowStyle;

}

But i got the index out of range error, since i there is no columns available at that time. I am trying to get the style as how we are having in the excel sheet, both column and row header in the same style.

Thanks,
Subash

Tags
GridView
Asked by
Subash
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Subash
Top achievements
Rank 1
Share this question
or