Hide or change the cell border colors

Posted by: scansoftpos on 8 September 2017, 2:27 pm EST

  • Posted 8 September 2017, 2:27 pm EST

    How can I change the cell border color column divider
  • Replied 8 September 2017, 2:27 pm EST

    placed this code on load event

    Dim i As Integer
    For i = 0 To GridCustomers.Columns.Count() - 1
    "gridName".Splits(0).DisplayColumns(i).ColumnDivider.Style = C1.Win.C1TrueDBGrid.LineStyleEnum.None
  • Replied 8 September 2017, 2:27 pm EST


    Yes, you are right you would need to set the Style or Color property of the column divider to either hide the column divider or change its color respectively. Here is the code for the same:

     //Change the color of the Column divider border
    c1TrueDBGrid1.Splits(0).DisplayColumns(0).ColumnDivider.Color = Color.Red

    //Hide the column divider border
    c1TrueDBGrid1.Splits(0).DisplayColumns(1).ColumnDivider.Style = C1.Win.C1TrueDBGrid.LineStyleEnum.None

    Hope it helps.

    Manpreet Kaur
  • Replied 12 September 2017, 10:55 pm EST

    *Can* I change the Column Divider Color in the theme editor? Or only by code as shown?

    Thank you.
  • Marked as Answer

    Replied 14 September 2017, 10:10 pm EST


    It won't be possible to change column divider colour in the theme editor/designer. However, you can use the above suggested approach. in the scenario

    In case of any other query, do let us know.

  • Replied 25 April 2022, 10:29 pm EST


    I've seen this thread while I was looking for a way to change the column dividers with the Theme Editor. OK, this seems to be not possible and this is still the case in current versions. I can use the workaround mentioned above, even if this is not a good solution, because if have to handle the different themes by myself in that case.

    But another and more important question is: How can I turn on the Column Dividers in die Column Headers? There are some Themes like MacSilver, where the Column Dividers in the grid itself are visible, but not in the Column Headers. This is important for our customers, because they have to grab and drag the Column Dividers to change the size of the columns. At the moment they have to grab an invisible thing:

    Any help would be appreciated.

    Kind regards,
  • Replied 27 April 2022, 1:18 am EST

    Hi Juergen,

    In the C1TrueDBGrid, to show Cell borders in column headers while using the MacSilver theme, you can create your own custom theme by taking the MacSilver theme as the base theme in the C1ThemeDesigner application. In the designer app, you can change the value of the C1TrueDBGrid\Styles\Heading\Borders\BorderType property of your custom theme to show the borders. Kindly refer to the attached sample showing the same.

    Best Regards,

  • Replied 6 May 2022, 12:53 am EST

    Hi Kartik,

    thanks for your reply and sorry for answering so late; I must have missed the notification, that there is an answer on this topic.

    I've tried your example and this shows the borders in the column headers as expected. However, if I set this property in my custom themes, it does still not show the borders, at least in most of the grids. Strange.

    You can possibly reproduce this behaviour on your side, because if I load your custom theme into the C1ThemeDesigner, it also does not show the column borders in the column captions:

    Do you have an idea, which setting is responsible for this behaviour?

    Thanks and kind regards,
  • Replied 6 May 2022, 1:21 am EST

    Quality of the screenshot is bad, here is a detail:

  • Replied 8 May 2022, 10:03 pm EST

    Hi Juergen,

    We could observe the issue while changing the BorderType property in the C1ThemeDesigner application. We have reported the issue to the development team and will let you know as soon as we have an update.

    Although this issue is only observed in the Theme preview TrueDBGrid of the C1ThemeDesigner app. When the theme is saved and used in an application, it persists all the changes done from the C1ThemeDesigner app. Please try to use your custom themes in an application and see if the changes are being persisted or not.


    Kind Regards,
  • Replied 9 May 2022, 12:03 am EST

    Hi Kartik,

    thanks for reportig the issue to the development!

    I've applied the saved theme to my application and the result is not always the same: some grids show the borders in the column headers and some don't. I have no idea, which setting or property leads to the different behaviour.

    Kind regards,
  • Replied 9 May 2022, 3:25 pm EST

    Hi Juergen,

    We could not replicate this behavior on our end. Please refer to the attached sample showing the behavior on our end. Could you please provide a small sample or update the attached sample to replicate the issue so we can investigate further and assist you in the best way possible? Also, please share the exact version of the C1 controls you are using.

    Also, please let us know if you use any specific properties in the Grids (that do not persist the changes) that might be related to the heading style or if there are any specific steps that you follow to replicate the behavior, so we can investigate accordingly.

    Kind Regards,

Need extra support?

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

Learn More

Forum Channels