Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclassed maintenanceform throwns exception
Message
De
26/08/2005 10:48:57
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Subclassed maintenanceform throwns exception
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01044312
Message ID:
01044312
Vues:
53
If you subclass a mmMaintenanceForm (ie; mmRolesForm) and modify its datagrid size then the following exception is thrown (it only seems to be thrown when using a TableStyle). This can be avoided by moving the call to this.grdRoles.Size = new System.Drawing.Size(343, 232) from the Initialize method to the form's load method.

CurrentCell cannot be set at this time. Moving your code to FormLoad should solve this problem.

at System.Windows.Forms.DataGrid.set_CurrentCell(DataGridCell value)
at System.Windows.Forms.DataGrid.BeginEdit(DataGridColumnStyle gridColumn, Int32 rowNumber)
at OakLeaf.MM.Main.Windows.Forms.mmDataGrid.ResizeColumns()
at OakLeaf.MM.Main.Windows.Forms.mmDataGrid.OnResize(EventArgs e)
at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height)
at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
at System.Windows.Forms.Control.SetBounds(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
at System.Windows.Forms.Control.set_Size(Size value)
at Miclis.ML6.Main.Windows.Forms.ML6RolleForm.InitializeComponent() in c:\documents and settings\andrew\my documents\visual studio projects\ml6.net\src\ml6\forms\security\ml6rolleform.cs:line 78
at Miclis.ML6.Main.Windows.Forms.ML6RolleForm..ctor() in c:\documents and settings\andrew\my documents\visual studio projects\ml6.net\src\ml6\forms\security\ml6rolleform.cs:line 17
at Miclis.ML6.Main.Windows.Forms.MainForm.FilRollerBar_Click(Object sender, EventArgs e) in C:\Documents and Settings\Andrew\My Documents\Visual Studio Projects\ML6.NET\src\ML6\Forms\MainForm.cs:line 1418
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Command.DispatchID(Int32 id)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)


Regards,

Andrew
Répondre
Fil
Voir

Click here to load this message in the networking platform