I want to hide and show border cell, same Excel

Posted by: eploentham on 21 December 2018, 11:35 am EST

    • Post Options:
    • Link

    Posted 21 December 2018, 11:35 am EST - Updated 4 October 2022, 1:41 am EST

  • Posted 24 December 2018, 4:30 am EST

    Hello,

    Please use the following line of code to achieve the desired result

    
        c1FlexGrid1.Cols[0].Visible = false;
        c1FlexGrid1.Rows[0].Visible = false;
    
    

    hope it helps.

    Thanks.

  • Posted 24 December 2018, 8:37 pm EST

    thank you for advice

    merry x’mas

    i use C1ThemeControl

    i understand i can’t use c1themecontrol for this script

    ,and i want to show border in under cell, in left border cell, or right border cell

    thank you

  • Posted 26 December 2018, 2:58 am EST

    Hello,

    As per my understanding, you want to change the border of the cell. Please use the following line of code to achieve the same :

    
      C1.Win.C1FlexGrid.CellStyle cs = c1FlexGrid1.Styles.Add("CellNeWStyle");
                cs.Border.Style = C1.Win.C1FlexGrid.BorderStyleEnum.None;
                cs.Border.Direction = C1.Win.C1FlexGrid.BorderDirEnum.Vertical;
    
                c1FlexGrid1.SetCellStyle(2, 2, cs);
    
    

    If my understanding is incorrect, please let me know.

    Thanks.

    WindowsFormsApp13.zip

  • Posted 10 January 2019, 5:03 am EST

    thank you

Need extra support?

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

Learn More

Forum Channels