V
Victor Crudu
Hi,
could somebody help me to solve the follwing problem ?
I get the following exception when i set as the DataSource of a DataGrid a
DataTable.
This situation can be only if I change programaticaly the minimum property
of the scroll bar to be >0. But i even do not have access to the scroll bars
of the grid because the scrollbars are protected.
Unhandled Exception:
'0' is not a valid value for 'value'. 'value' should be between 'minimum'
and 'maximum'.
Error source: System.Windows.Forms
System.ArgumentException
Stack Trace:
at System.Windows.Forms.ScrollBar.set_Value(Int32 value)
at System.Windows.Forms.DataGrid.SetDataGridTable(DataGridTableStyle
newTable, Boolean forceColumnCreation)
at System.Windows.Forms.DataGrid.Set_ListManager(Object newDataSource,
String newDataMember, Boolean force, Boolean forceColumnCreation)
at System.Windows.Forms.DataGrid.Set_ListManager(Object newDataSource,
String newDataMember, Boolean force)
at System.Windows.Forms.DataGrid.set_DataSource(Object value)
at FastEmailSender.MainForm.RulesTree_AfterSelect(Object sender,
TreeViewEventArgs e)
at System.Windows.Forms.TreeViewEventHandler.Invoke(Object sender,
TreeViewEventArgs e)
at System.Windows.Forms.TreeView.OnAfterSelect(TreeViewEventArgs e)
at System.Windows.Forms.TreeView.TvnSelected(NMTREEVIEW* nmtv)
at System.Windows.Forms.TreeView.WmNotify(Message& m)
at System.Windows.Forms.TreeView.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
could somebody help me to solve the follwing problem ?
I get the following exception when i set as the DataSource of a DataGrid a
DataTable.
This situation can be only if I change programaticaly the minimum property
of the scroll bar to be >0. But i even do not have access to the scroll bars
of the grid because the scrollbars are protected.
Unhandled Exception:
'0' is not a valid value for 'value'. 'value' should be between 'minimum'
and 'maximum'.
Error source: System.Windows.Forms
System.ArgumentException
Stack Trace:
at System.Windows.Forms.ScrollBar.set_Value(Int32 value)
at System.Windows.Forms.DataGrid.SetDataGridTable(DataGridTableStyle
newTable, Boolean forceColumnCreation)
at System.Windows.Forms.DataGrid.Set_ListManager(Object newDataSource,
String newDataMember, Boolean force, Boolean forceColumnCreation)
at System.Windows.Forms.DataGrid.Set_ListManager(Object newDataSource,
String newDataMember, Boolean force)
at System.Windows.Forms.DataGrid.set_DataSource(Object value)
at FastEmailSender.MainForm.RulesTree_AfterSelect(Object sender,
TreeViewEventArgs e)
at System.Windows.Forms.TreeViewEventHandler.Invoke(Object sender,
TreeViewEventArgs e)
at System.Windows.Forms.TreeView.OnAfterSelect(TreeViewEventArgs e)
at System.Windows.Forms.TreeView.TvnSelected(NMTREEVIEW* nmtv)
at System.Windows.Forms.TreeView.WmNotify(Message& m)
at System.Windows.Forms.TreeView.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)