Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Activating last grid TextBox on form re-activate
Message
De
01/11/2008 19:51:42
 
 
À
31/10/2008 16:40:32
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01358796
Message ID:
01358917
Vues:
16
See my reply to you in your other thread, at Message #1358916

~~Bonnie



>How to allow user to continue data enty to same grid cell after form is activated again.
>
>Steps to reproduce:
>
>1. Run code.
>2. Enter some data to grid
>3. Click other form caption
>4. Click original form caption
>5. Enter some characters
>
>Observed: entered characters are ignored
>
>Expected: entered characters must appear in last cell before form activation
>
>How to fix ?
>
>
>
using System.Windows.Forms;
>
>public class Test
>{
>    static void Main()
>    {
>        Application.Run(new MainForm());
>    }
>}
>
>class MainForm : Form
>{
>    public MainForm()
>    {
>        WindowState = FormWindowState.Maximized;
>        IsMdiContainer = true;
>        Form frm = new Childform();
>        frm.MdiParent = this;
>        frm.Show();
>        Form frm2 = new Childform();
>        frm2.MdiParent = this;
>        frm2.Show();
>        frm2.Left = 2000;
>    }
>}
>
>class Childform : Form
>{
>    public Childform()
>    {
>        var grid = new DataGridView();
>        grid.Columns.Add(new DataGridViewTextBoxColumn());
>        grid.EditMode = DataGridViewEditMode.EditOnEnter;
>        Controls.Add(grid);
>    }
>}
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform