Menu

Column visible or invisible

Help
2006-10-02
2013-04-23
  • Nobody/Anonymous

    Hi,

    I want to know if there is a way to make a column visible or invisible.

    Thanks in advance.

     
    • Davide Icardi

      Davide Icardi - 2006-10-02

      Hi,
      I have worked on this feature but it is not yet completed.
      I have reviewed the scrolling code and now it is simpler to implement invisible rows/columns, so I hope to complete this feature soon.

      I will open a feature request here on SourceForge.

      For now the only workaround is to set the width/height at 0.
      Consider also that if you want to make a column invisible only for saving custom hidden data there are other solutions, like using the Tag property or in the DataGriddon't bind a specific column.

      Davide

       
    • Nobody/Anonymous

      Thanks for your reply Davide.

      I am trying to use DataGrid to set the columns invisible, but now I have other problems.

      1) How can I make a column span with DataGrid ?
      2) How can I make a column header unresizable ?
      I try to use the controller Resizeable set to CellResizeMode.None but don't works, if I click on column border I can still resize the column.

       
      • Davide Icardi

        Davide Icardi - 2006-10-03

        1) Unfortunately column and row span works only for Grid control.
        The GridVirtual doesn't support merged cells, and it is quite difficult to implement it because of the GridVirtual internal structure. I will think if it is possible to work on this in the future but for now it is impossible.
        I'm sorry

        2) You can write this code:
                    SourceGrid.DataGridColumnHeader header = (SourceGrid.DataGridColumnHeader)dataGrid.Columns[1].HeaderCell;
                    header.ResizeEnabled = false;

        Davide

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.