By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,919 Members | 1,600 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,919 IT Pros & Developers. It's quick & easy.

ScrollBar System.ArgumentException

P: n/a
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(Dat aGridTableStyle
newTable, Boolean forceColumnCreation)
at System.Windows.Forms.DataGrid.Set_ListManager(Obje ct newDataSource,
String newDataMember, Boolean force, Boolean forceColumnCreation)
at System.Windows.Forms.DataGrid.Set_ListManager(Obje ct newDataSource,
String newDataMember, Boolean force)
at System.Windows.Forms.DataGrid.set_DataSource(Objec t value)
at FastEmailSender.MainForm.RulesTree_AfterSelect(Obj ect sender,
TreeViewEventArgs e)
at System.Windows.Forms.TreeViewEventHandler.Invoke(O bject sender,
TreeViewEventArgs e)
at System.Windows.Forms.TreeView.OnAfterSelect(TreeVi ewEventArgs e)
at System.Windows.Forms.TreeView.TvnSelected(NMTREEVI EW* 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(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)


Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.