How to prevent user from finding non-visible columns in C1TrueDBGrid?

Posted by: dcannon on 27 June 2023, 4:45 am EST

    • Post Options:
    • Link

    Posted 27 June 2023, 4:45 am EST - Updated 27 June 2023, 4:50 am EST

    I am using a C1TrueDBGrid (vb.net), and the user can move the cursor to the right of the right-most column and the cursor will turn into a vertical bar with a right arrow. The user can then click and drag to the right and expose columns in the grid that are not visible. How do I prevent this? Is there a setting that prevents the user from having this option?

    On this page, I found it referenced:

    https://www.grapecity.com/componentone/docs/win/online-truedbgrid/sizing-splitting.html

    It says,

    “To make the column visible again, the user can point to the right side of the divider of the column that preceded it. The pointer turns into a vertical bar with a right arrow. Dragging the pointer to the right establishes a new column width and sets the column’s Visible property back to True.”

    But, I cannot find anywhere to set any setting to prevent this from happening.

    Please see attached image, and forgive the horrible image! If I tried to take a screen shot, the cursor disappeared. I took this pic with my phone of the vertical bar with arrow cursor in question.

    Any thoughts? Thank you!

    Doug Cannon

  • Posted 27 June 2023, 5:09 pm EST

    Hi Doug,

    To prevent the customer from showing the hidden columns, you can set the C1DisplayColumn.AllowSizing property to false. Please see the attached sample project for reference.

    c1TrueDBGrid1.Splits[0].DisplayColumns["ColName"].Visible = false;
    c1TrueDBGrid1.Splits[0].DisplayColumns["ColName"].AllowSizing = false;

    Attachment: TdbgHiddenCols.zip

    Best Regards,

    Kartik

Need extra support?

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

Learn More

Forum Channels