Home Forums WinForms controls Xceed Grid for WinForms FixedHeaderRows not shown

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #15441 |

    Hello,

    I want to add a new text row in a grid with some text using the following piece of code:

    grid.BeginInit();
    grid.Clear();
    grid.AllowCellNavigation = false;
    grid.RowSelectorPane.Visible = false;

    TextRow row = new TextRow(“New TextRow”);
    grid.FixedHeaderRows.Add(row);
    grid.EndInit();

    The problem is that the grid remains empty and no row is shown. What’s wrong?

    Many Thanks.

    Imported from legacy forums. Posted by Javier (had 2352 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,

    Now this code “works”. There were another problem in code.

    Thanks.

    Imported from legacy forums. Posted by Javier (had 405 views)

    User (Old forums)
    Member
    Post count: 23064

    You need to have at least one column present in the grid.

    e.g.:

    grid.BeginInit();
    grid.Clear();
    grid.AllowCellNavigation = false;
    grid.RowSelectorPane.Visible = false;

    Column column = new Column( “Column1” );
    grid.Columns.Add( column );

    TextRow row = new TextRow(“New TextRow”);
    grid.FixedHeaderRows.Add(row);
    grid.EndInit();

    Imported from legacy forums. Posted by André (had 3562 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.