Here is a very simple implementation for you
using System;
using System.Drawing;
using System.Collecti ons;
using System.Componen tModel;
using System.Windows. Forms;
using System.Data;
namespace UsingASplitter
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows. Forms.Form
{
private System.Windows. Forms.DataGrid dataGrid1;
private System.Windows. Forms.Splitter splitter1;
private System.Windows. Forms.DataGrid dataGrid2;
/// <summary>
/// Required designer variable.
/// </summary>
private System.Componen tModel.Containe r components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeCompo nent();
//
// TODO: Add any constructor code after InitializeCompo nent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Disp ose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeCompo nent()
{
this.dataGrid1 = new System.Windows. Forms.DataGrid( );
this.splitter1 = new System.Windows. Forms.Splitter( );
this.dataGrid2 = new System.Windows. Forms.DataGrid( );
((System.Compon entModel.ISuppo rtInitialize)(t his.dataGrid1)) .BeginInit();
((System.Compon entModel.ISuppo rtInitialize)(t his.dataGrid2)) .BeginInit();
this.SuspendLay out();
//
// dataGrid1
//
this.dataGrid1. DataMember = "";
this.dataGrid1. Dock = System.Windows. Forms.DockStyle .Top;
this.dataGrid1. HeaderForeColor = System.Drawing. SystemColors.Co ntrolText;
this.dataGrid1. Location = new System.Drawing. Point(0, 0);
this.dataGrid1. Name = "dataGrid1" ;
this.dataGrid1. Size = new System.Drawing. Size(292, 80);
this.dataGrid1. TabIndex = 0;
//
// splitter1
//
this.splitter1. Dock = System.Windows. Forms.DockStyle .Top;
this.splitter1. Location = new System.Drawing. Point(0, 80);
this.splitter1. Name = "splitter1" ;
this.splitter1. Size = new System.Drawing. Size(292, 3);
this.splitter1. TabIndex = 1;
this.splitter1. TabStop = false;
//
// dataGrid2
//
this.dataGrid2. DataMember = "";
this.dataGrid2. Dock = System.Windows. Forms.DockStyle .Fill;
this.dataGrid2. HeaderForeColor = System.Drawing. SystemColors.Co ntrolText;
this.dataGrid2. Location = new System.Drawing. Point(0, 83);
this.dataGrid2. Name = "dataGrid2" ;
this.dataGrid2. Size = new System.Drawing. Size(292, 183);
this.dataGrid2. TabIndex = 2;
//
// Form1
//
this.AutoScaleB aseSize = new System.Drawing. Size(5, 13);
this.ClientSize = new System.Drawing. Size(292, 266);
this.Controls.A dd(this.dataGri d2);
this.Controls.A dd(this.splitte r1);
this.Controls.A dd(this.dataGri d1);
this.Name = "Form1";
this.Text = "Form1";
((System.Compon entModel.ISuppo rtInitialize)(t his.dataGrid1)) .EndInit();
((System.Compon entModel.ISuppo rtInitialize)(t his.dataGrid2)) .EndInit();
this.ResumeLayo ut(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run (new Form1());
}
}
}
Br
Mark.
"Hrcko" <hr**********@z g.htnet.hr> wrote in message
news:d9******** **@ss405.t-com.hr...
How to use this control?
I have to grids on my form, one on the top and one on bottom.
When I start application I want to be able to move bottom grip up, and top
grid down, but it doesn't work!
Where should I put splitter?
Hrcko