Column and Row Headings

Posted by: shuvendu-das on 8 September 2017, 12:44 pm EST

  • Posted 8 September 2017, 12:44 pm EST

    Hi,


    In the grid i have two coulmns for say ID and Name.For these two columns i have 5 rows of datas Is there any built in property avaliable so that these column headers can be converted into row headings and according to that the data also automatically adjusted.


    Regards


    Shuvendu


     

  • Replied 8 September 2017, 12:44 pm EST

    Shuvendu,


    There is not anything built in to transform the columns and rows like this.

  • Replied 8 September 2017, 12:44 pm EST

    If you simply want to make them 'look' like they are row headers you could simply freeze the first 2 columns and change their appearance to match header cells. (Only requires a few lines of code.)
  • Replied 8 September 2017, 12:44 pm EST

    Hi,


    Can i get that get that few lines  of code that has been  suggested by you.


    Thanxs


    Shuvendu

  • Replied 8 September 2017, 12:44 pm EST

    Hello,


    You can set the RowHeaderColumnCount property to 3 and then fill columns1 and 2 in the RowHeader with the data from these data columns.

     
    FpSpread1.Sheets(0).RowHeaderColumnCount = 3
    For i as Integer = 0 to FpSpread1.Sheets(0).RowCount - 1
    FpSpread1.Sheets(0).RowHeader.Cells(i,1).Value = FpSpread1.Sheets(0).Cells(i,0).Value
    FpSpread1.Sheets(0).RowHeader.Cells(i,2).Value = FpSpread1.Sheets(0).Cells(i,1).Value
    Next i
    FpSpread1.Sheets(0).RemoveColumns(0,2)
     
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels