Merge Columns

Posted by: ashapournami on 8 September 2017, 1:12 pm EST

  • Posted 8 September 2017, 1:12 pm EST

    Hi


    I am loading the spreadsheet from a datatable and I have set the merge for column 0 through the


    SetColumnMerge method.


    But the problem is that although it is merging correctly all the individual rows corresponding to the column 0 are also editable ie we can enter values to each individual rows eventhogh they are merged.


    Can u please give a solution for this


     


    Thanks


    Asha

  • Replied 8 September 2017, 1:12 pm EST

    You can lock cells (locked) that you do not want the user to edit.

     FpSpread1.Sheets(0).SetColumnMerge(0, Model.MergePolicy.Always)
            FpSpread1.Sheets(0).Cells(0, 0).Value = "test"
            FpSpread1.Sheets(0).Cells(1, 0).Value = "test"
            FpSpread1.Sheets(0).Cells(0, 0).Locked = True
            FpSpread1.Sheets(0).Cells(1, 0).Locked = True
Need extra support?

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

Learn More

Forum Channels