Click here to Skip to main content
15,905,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: Transparency Pin
Jeremy Kimball24-Oct-03 5:24
Jeremy Kimball24-Oct-03 5:24 
GeneralRe: Transparency Pin
Den2Fly24-Oct-03 7:28
Den2Fly24-Oct-03 7:28 
GeneralSimple XPath Question Pin
antoine@orchus-tech23-Oct-03 9:55
antoine@orchus-tech23-Oct-03 9:55 
GeneralRe: Simple XPath Question Pin
Christian Graus23-Oct-03 11:40
protectorChristian Graus23-Oct-03 11:40 
GeneralRe: Simple XPath Question Pin
Tomas Petricek23-Oct-03 12:26
Tomas Petricek23-Oct-03 12:26 
GeneralRe: Simple XPath Question Pin
hravn24-Oct-03 7:16
hravn24-Oct-03 7:16 
GeneralRe: Simple XPath Question Pin
John Arlen24-Oct-03 7:25
John Arlen24-Oct-03 7:25 
GeneralA brand new Bug in the .net datagrid :( Pin
livss23-Oct-03 7:27
livss23-Oct-03 7:27 
Hi!

The point is that while scrolling within a datagrid, sometimes the gridloses focus with no reason because I was just scrolling.The class below simply illustrates this(while scrolling you'll get a message)

Thank you in advance.
ps: I'm using vs.net 2003.

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace test2k3
{
///
/// Summary description for Form1.
///

public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.DataGrid dg;
private DataTable dt;
private System.Windows.Forms.Button button1;
///
/// Required designer variable.
///

private System.ComponentModel.Container components = null;

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
dt = new DataTable();
DataColumn dc = new DataColumn("Nr");
dt.Columns.Add(dc);

for(int i = 0 ; i < 100; i++)
{
DataRow dr = dt.NewRow();
dr[0] = "row #"+i;
dt.Rows.Add(dr);
}
this.dg.DataSource = dt;
}

///
/// Clean up any resources being used.
///

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

private void InitializeComponent()
{
this.dg = new System.Windows.Forms.DataGrid();
this.button1 = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dg)).BeginInit();
this.SuspendLayout();
//
// dg
//
this.dg.DataMember = "";
this.dg.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dg.Location = new System.Drawing.Point(24, 16);
this.dg.Name = "dg";
this.dg.Size = new System.Drawing.Size(160, 128);
this.dg.TabIndex = 0;
this.dg.Leave += new System.EventHandler(this.dg_Leave);
//
// button1
//
this.button1.Location = new System.Drawing.Point(232, 64);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(56, 32);
this.button1.TabIndex = 1;
this.button1.Text = "button1";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(328, 173);
this.Controls.Add(this.button1);
this.Controls.Add(this.dg);
this.Name = "Form1";
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)(this.dg)).EndInit();
this.ResumeLayout(false);

}
#endregion

///
/// The main entry point for the application.
///

[STAThread]
static void Main()
{
Application.Run(new Form1());
}

private void dg_Leave(object sender, System.EventArgs e)
{
MessageBox.Show("You haven't leaved the grid.You've been just scrolling!","Is This A Bug?");
}



}
AnswerRe: Where is the Application Object? Pin
leppie23-Oct-03 7:09
leppie23-Oct-03 7:09 
AnswerRe: Where is the Application Object? Pin
shaunAustin26-Oct-03 21:56
shaunAustin26-Oct-03 21:56 
GeneralRe: Where is the Application Object? Pin
Anonymous28-Oct-03 6:33
Anonymous28-Oct-03 6:33 
QuestionWhere is the Application Object? Pin
Anonymous23-Oct-03 5:55
Anonymous23-Oct-03 5:55 
GeneralSized form for pocket pc Pin
Member 51467223-Oct-03 4:57
Member 51467223-Oct-03 4:57 
General_getch() Pin
viliam23-Oct-03 2:58
viliam23-Oct-03 2:58 
GeneralRe: _getch() Pin
Mike Dimmick23-Oct-03 3:31
Mike Dimmick23-Oct-03 3:31 
GeneralRe: _getch() Pin
J. Dunlap23-Oct-03 8:53
J. Dunlap23-Oct-03 8:53 
GeneralRe: _getch() Pin
leppie23-Oct-03 9:12
leppie23-Oct-03 9:12 
GeneralRe: _getch() Pin
J. Dunlap23-Oct-03 9:17
J. Dunlap23-Oct-03 9:17 
GeneralRe: _getch() Pin
shaunAustin26-Oct-03 21:58
shaunAustin26-Oct-03 21:58 
GeneralPlaying a simple sound with C# Pin
bsargos23-Oct-03 1:52
bsargos23-Oct-03 1:52 
GeneralRe: Playing a simple sound with C# Pin
Judah Gabriel Himango24-Oct-03 4:25
sponsorJudah Gabriel Himango24-Oct-03 4:25 
QuestionHow to configure an Ethernet connection? Pin
azazel1234523-Oct-03 1:28
azazel1234523-Oct-03 1:28 
AnswerRe: How to configure an Ethernet connection? Pin
Giles23-Oct-03 3:03
Giles23-Oct-03 3:03 
GeneralRe: How to configure an Ethernet connection? Pin
azazel1234523-Oct-03 4:04
azazel1234523-Oct-03 4:04 
GeneralRe: How to configure an Ethernet connection? Pin
Kentamanos23-Oct-03 7:36
Kentamanos23-Oct-03 7:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.