ScrollBar System.ArgumentException

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Victor Crudu

    #1

    ScrollBar System.ArgumentException

    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.Argument Exception
    Stack Trace:
    at System.Windows. Forms.ScrollBar .set_Value(Int3 2 value)
    at System.Windows. Forms.DataGrid. SetDataGridTabl e(DataGridTable Style
    newTable, Boolean forceColumnCrea tion)
    at System.Windows. Forms.DataGrid. Set_ListManager (Object newDataSource,
    String newDataMember, Boolean force, Boolean forceColumnCrea tion)
    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.Rules Tree_AfterSelec t(Object sender,
    TreeViewEventAr gs e)
    at System.Windows. Forms.TreeViewE ventHandler.Inv oke(Object sender,
    TreeViewEventAr gs e)
    at System.Windows. Forms.TreeView. OnAfterSelect(T reeViewEventArg s e)
    at System.Windows. Forms.TreeView. TvnSelected(NMT REEVIEW* nmtv)
    at System.Windows. Forms.TreeView. WmNotify(Messag e& m)
    at System.Windows. Forms.TreeView. WndProc(Message & m)
    at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
    at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
    at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg,
    IntPtr wparam, IntPtr lparam)






Working...