I get an error message since i installed visual studio 2003 :-(
Please help me why i get this message?
An unhandled exception of type 'System.ObjectD isposedExceptio n' occurred in
system.windows. forms.dll
Additional information: Cannot access a disposed object named
"DataGridTextBo x".
I get this after this syntax... i have no idea why i get this..
has anywhere a idea?
private void dataGridFiBuMan dantDetail_Clic k(object sender,
System.Windows. Forms.MouseEven tArgs e)
{
// Bei Klick soll eine Detailmaske aufgehen
// Abfragen ob der Event gestartet werden darf
if (strEventMouseD own == "ON")
{
//string str = null;
Point pt = new Point(e.X, e.Y);
DataGrid.HitTes tInfo hti = dataGridFiBuMan dant.HitTest(pt );
// Rechte Maustaste
if(e.Button == MouseButtons.Ri ght)
{
MessageBox.Show ("Bitte mit der linken Maustaste anklicken, \n" +
"um das Detail dieser Zeile anzuzeigen. \n"+
"Das Löschen mit der Maus erfolgt später.");
}
// Linke Maustaste
if ((e.Button == MouseButtons.Le ft) && (hti.Type ==
DataGrid.HitTes tType.Cell))
{
frmHauptmenue.S trMandant = (dataGridFiBuMa ndant[hti.Row, 1].ToString());
frmHauptmenue.I ntMandantID = (int)(dataGridF iBuMandant[hti.Row, 0]);
this.Close();
}
}
}
Please help me why i get this message?
An unhandled exception of type 'System.ObjectD isposedExceptio n' occurred in
system.windows. forms.dll
Additional information: Cannot access a disposed object named
"DataGridTextBo x".
I get this after this syntax... i have no idea why i get this..
has anywhere a idea?
private void dataGridFiBuMan dantDetail_Clic k(object sender,
System.Windows. Forms.MouseEven tArgs e)
{
// Bei Klick soll eine Detailmaske aufgehen
// Abfragen ob der Event gestartet werden darf
if (strEventMouseD own == "ON")
{
//string str = null;
Point pt = new Point(e.X, e.Y);
DataGrid.HitTes tInfo hti = dataGridFiBuMan dant.HitTest(pt );
// Rechte Maustaste
if(e.Button == MouseButtons.Ri ght)
{
MessageBox.Show ("Bitte mit der linken Maustaste anklicken, \n" +
"um das Detail dieser Zeile anzuzeigen. \n"+
"Das Löschen mit der Maus erfolgt später.");
}
// Linke Maustaste
if ((e.Button == MouseButtons.Le ft) && (hti.Type ==
DataGrid.HitTes tType.Cell))
{
frmHauptmenue.S trMandant = (dataGridFiBuMa ndant[hti.Row, 1].ToString());
frmHauptmenue.I ntMandantID = (int)(dataGridF iBuMandant[hti.Row, 0]);
this.Close();
}
}
}
Comment