Row Header Style

5 posts, 0 answers
  1. Subash
    Subash avatar
    15 posts
    Member since:
    Dec 2012

    Posted 14 Feb 2013 Link to this post

    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
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 14 Feb 2013 Link to this post

    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.

  3. Subash
    Subash avatar
    15 posts
    Member since:
    Dec 2012

    Posted 14 Feb 2013 Link to this post

    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
  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 15 Feb 2013 Link to this post

    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.

  5. Subash
    Subash avatar
    15 posts
    Member since:
    Dec 2012

    Posted 17 Feb 2013 Link to this post

    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

Back to Top