Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Gird's scrollbar gets hidden

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Gird's scrollbar gets hidden
Link Posted: 14-Jul-2006 01:43
Hi,

It seems like a bug of FlyGrid. Encountered under MS VS 2003.

Create a new empty form.
Add a Panel on it.
Dock Panel to bottom.
Add a Splitter to a form.
Dock Splitter to bottom.
Add a FlyGrid to a form.
Add many columns to the FlyGrid so the horizontal scrollbar appears.
Set FlyGrid.Dock to Fill mode.

Grid's horizontal scroll bar gets hidden and does not appear anymore neither in Design nor in Runtime.

How to make grid's bottom horizontal scrollbar be visible in case of such form layout?

Thank you.
Link Posted: 14-Jul-2006 09:43
What version of FlyGrid do you use?
I've tried to reproduce this problem - following your scenario and getting correct behaviour of horz. scrollbar in design-time/runtime.
May be you've disabled horizontal scrollbar in your code?
Please check your code for the flygrid.ActivePort (or ActiveRootPort) .HScrollBarEnabled = false; line of code and comment this line to enable horizontal scrollbar.
Link Posted: 16-Jul-2006 20:31

      this.flyGrid1.Options = ((NineRays.Windows.Forms.Grids.GridOptions)((NineRays.Windows.Forms.Grids.GridOptions.RowSelect | NineRays.Windows.Forms.Grids.GridOptions.Default)));
      this.flyGrid1.Size = new System.Drawing.Size(384, 280);
      this.flyGrid1.TabIndex = 0;
      this.flyGrid1.Text = \"flyGrid1\";
      //
      // column1
      //
      this.column1.Caption = \"Column0\";
      //
      // column2
      //
      this.column2.Caption = \"Column1\";
      //
      // column3
      //
      this.column3.Caption = \"Column2\";
      //
      // column4
      //
      this.column4.Caption = \"Column3\";
      //
      // column5
      //
      this.column5.Caption = \"Column4\";
      //
      // column6
      //
      this.column6.Caption = \"Column5\";
      //
      // column7
      //
      this.column7.Caption = \"Column6\";
      //
      // column8
      //
      this.column8.Caption = \"Column7\";
      //
      // column9
      //
      this.column9.Caption = \"Column8\";
      //
      // panel1
      //
      this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
      this.panel1.Location = new System.Drawing.Point(0, 337);
      this.panel1.Name = \"panel1\";
      this.panel1.Size = new System.Drawing.Size(616, 100);
      this.panel1.TabIndex = 2;
      //
      // splitter1
      //
      this.splitter1.Dock = System.Windows.Forms.DockStyle.Bottom;
      this.splitter1.Location = new System.Drawing.Point(0, 334);
      this.splitter1.Name = \"splitter1\";
      this.splitter1.Size = new System.Drawing.Size(616, 3);
      this.splitter1.TabIndex = 3;
      this.splitter1.TabStop = false;
      //
      // Form1
      //
      this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
      this.ClientSize = new System.Drawing.Size(616, 437);
      this.Controls.Add(this.splitter1);
      this.Controls.Add(this.panel1);
      this.Controls.Add(this.flyGrid1);
      this.Name = \"Form1\";
      this.Text = \"Form1\";
      this.Load += new System.EventHandler(this.Form1_Load);
      ((System.ComponentModel.ISupportInitialize)(this.flyGrid1)).EndInit();
      this.ResumeLayout(false);

    }
    #endregion

    ///
    /// The main entry point for the application.
    ///
    [STAThread]
    static void Main()
    {
      Application.Run(new Form1());
    }

    private void Form1_Load(object sender, System.EventArgs e)
    {
      flyGrid1.Rows.Items.Add( new Node(new object[] { 1, \"Hello1\" } ));
      flyGrid1.Rows.Items.Add( new Node(new object[] { 2, \"Hello2\" } ));
      flyGrid1.Rows.Items.Add( new Node(new object[] { 3, \"Hello3\" } ));
      flyGrid1.Rows.Items.Add( new Node(new object[] { 4, \"Hello4\" } ));
    }
  }
}
Link Posted: 16-Jul-2006 21:12
I've tried your sample (thanks) with latest FlyGrid ( 1.4.0.18 ) - all works fine, scrollbar appears (design and runtime, vs.net 2003, .Net 1.1):
Link Posted: 16-Jul-2006 21:31
[quote="NineRays"]I've tried your sample (thanks) with latest FlyGrid ( 1.4.0.18 ) - all works fine, scrollbar appears (design and runtime, vs.net 2003, .Net 1.1):


Yeah  that's right.
Now apply flyGrid.Dock = DockStyle.Fill and you shouldn't see the horizontal scrollbar. It will be hidden behind the bottom splitter (as I assume).
Link Posted: 16-Jul-2006 22:08
Horizontal scrolbar is appears correctly, but FlyGrid is not correctly resized - bottom of control is a bit below of splitter (to see this effect - set FlyGrid's BorderStyle to Fixed3D).
If you'll place Panel control to the top part of the form, set it's Dock to the DockStyle.Fill of this form, place FlyGrid into this panel and set FlyGrid's Dock to the DockStyle.Fill also - you can see the correct work of horizontal scrollbar:
Link Posted: 16-Jul-2006 22:18
[quote="NineRays"]Horizontal scrolbar is appears correctly, but FlyGrid is not correctly resized - bottom of control is a bit below of splitter (to see this effect - set FlyGrid's BorderStyle to Fixed3D).
If you'll place Panel control to the top part of the form, set it's Dock to the DockStyle.Fill of this form, place FlyGrid into this panel and set FlyGrid's Dock to the DockStyle.Fill also - you can see the correct work of horizontal scrollbar:


Thank you for the workaround, it works.