Hello
Je teste le concepteur de forms auto et j'ai un petit soucis.
Lorsque je change l'item selectionén dans ma combobox, le prog me retourne l'erreur suivante:
L'exception System.Data.ConstraintException n'a pas été gérée
Message="La colonne 'Aménageur' doit être unique. La valeur 'BENILAN Christian' est déjà présente."
Source="System.Data"
StackTrace:
à System.Data.UniqueConstraint.CheckConstraint(DataRow row, DataRowAction action)
à System.Data.DataTable.RaiseRowChanging(DataRowChangeEventArgs args, DataRow eRow, DataRowAction eAction, Boolean fireEvent)
à System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Int32 position, Boolean fireEvent, Exception& deferredException)
à System.Data.DataTable.SetNewRecord(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Boolean fireEvent)
à System.Data.DataRow.EndEdit()
à System.Data.DataRowView.EndEdit()
à System.Windows.Forms.CurrencyManager.EndCurrentEdit()
à System.Windows.Forms.CurrencyManager.ChangeRecordState(Int32 newPosition, Boolean validating, Boolean endCurrentEdit, Boolean firePositionChange, Boolean pullData)
à System.Windows.Forms.CurrencyManager.set_Position(Int32 value)
à System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
à System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
à System.Windows.Forms.ComboBox.WndProc(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
à System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
à System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
à System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
à System.Windows.Forms.Control.WmCommand(Message& m)
à System.Windows.Forms.Control.WndProc(Message& m)
à System.Windows.Forms.ScrollableControl.WndProc(Message& m)
à System.Windows.Forms.ContainerControl.WndProc(Message& m)
à System.Windows.Forms.Form.WndProc(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
à System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
à System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
à System.Windows.Forms.Control.DefWndProc(Message& m)
à System.Windows.Forms.Control.WmCommand(Message& m)
à System.Windows.Forms.Control.WndProc(Message& m)
à System.Windows.Forms.ComboBox.WndProc(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.Run(ApplicationContext context)
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
à Apli.My.MyApplication.Main(String[] Args) dans 17d14f5c-a337-4978-8281-53493378c1071.vb:ligne 81
à System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()
InnerException:
Je ne comprends pas trop puisque je ne demande pas de sauvegarder ou de faire un update, je veux seulement qu'il charge les infos correspondantes dans les textbox et combobox du form.
Si je change mon databinding de ma combobox, que je ne mets rien dans la partie member value, le changement d'item de la combo fonctionne, mais je ne peux plus quitter le form. je ne peux pas non plus selectionner d'autres controles ou appuyer sur aucun des boutons du bindingnavigator.
Partager