I recently upgraded my project to RadControls for WinForms Q3 2009 SP1 and now due to the following errors my application will not even open.
I get the following error whenever I try to set the ValueMember of a GridViewComboBoxColumn. The model I am using has a string for the text Display Member and an integer for the ValueMember. Other GridViewComboBoxColumns where I use a string and a string are not having this issue?
Value of '-2' is not valid for 'LargeChange'. 'LargeChange' must be greater than or equal to 0.
Parameter name: LargeChange
at Telerik.WinControls.UI.RadScrollBarElement.set_LargeChange(Int32 value)
at Telerik.WinControls.UI.GridTableElement.UpdateVScrollBarVisibility(SizeF bodySize)
at Telerik.WinControls.UI.GridTableElement.UpdateChildViewHeight(Int32 delta)
at Telerik.WinControls.UI.GridTableElement.Update_OperationChanged(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
at Telerik.WinControls.UI.GridTableElement.UpdateCore(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
at Telerik.WinControls.UI.GridViewTemplate.UpdateUI(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
at Telerik.WinControls.Data.DataAccessComponent.FilterExpressionChanged2()
at Telerik.WinControls.UI.GridViewDataColumn.set_DataType(Type value)
at Telerik.WinControls.UI.GridViewLookUpColumn.SetFieldDescriptors()
at LeaseTracker.Views.TrackerGrid.InitializeIsSBAN() in F:\Projects\LeaseTracker\LeaseTrackerProj\LeaseTracker\Views\TrackerGrid.cs:line 1004
at LeaseTracker.Views.TrackerGrid.InitializeGridDropDowns() in F:\Projects\LeaseTracker\LeaseTrackerProj\LeaseTracker\Views\TrackerGrid.cs:line 956
at LeaseTracker.MainForm.PopulateGrid(String name) in F:\Projects\LeaseTracker\LeaseTrackerProj\LeaseTracker\MainForm.cs:line 448
at LeaseTracker.MainForm.OnTabSelected(Object sender, TabEventArgs args) in F:\Projects\LeaseTracker\LeaseTrackerProj\LeaseTracker\MainForm.cs:line 436
at Telerik.WinControls.UI.TabEventHandler.Invoke(Object sender, TabEventArgs args)
at Telerik.WinControls.UI.RadTabStripElement.RaiseTabSelected(RadElement tab)
at Telerik.WinControls.UI.RadTabStripElement.SetIsSelected(RadElement childElement, Boolean value)
at Telerik.WinControls.UI.RadTabStripElement.SetSelectedTab(RadElement tabElement)
at Telerik.WinControls.UI.TabItem.set_IsSelected(Boolean value)
at LeaseTracker.MainForm.InitializeComponent() in F:\Projects\LeaseTracker\LeaseTrackerProj\LeaseTracker\MainForm.Designer.cs:line 514
at LeaseTracker.MainForm..ctor() in F:\Projects\LeaseTracker\LeaseTrackerProj\LeaseTracker\MainForm.cs:line 39
Pseudo Code below shows the lines where this is occur and sample model I refer to above :
private void InitializeTechnology () { |
IList<DropDownIntItem> ddList = ListTechnology(); |
this.TechnologyColumn.DataSource = ddList; |
this.TechnologyColumn.DisplayMember = "Name"; |
this.TechnologyColumn.ValueMember = "ID"; // ERRORS HERE |
} |
// ~~~ // |
public class DropDownIntItem { |
private string _name; |
private int _id; |
public DropDownIntItem(int id, string nam) { |
this._name = nam; |
this._id = id; |
} |
public string Name { |
get { return _name; } |
} |
public int ID { |
get { return _id; } |
} |
} |
======================================================================
Even if I comment out all the ValueMember items being set for the various combobox columns I still receive the same error on the following line of code later in the process:
this.gridView.MasterGridViewTemplate.GroupByExpressions.Clear(); |
Value of '-2' is not valid for 'LargeChange'. 'LargeChange' must be greater than or equal to 0.
Parameter name: LargeChange
at Telerik.WinControls.UI.RadScrollBarElement.set_LargeChange(Int32 value)
at Telerik.WinControls.UI.GridTableElement.UpdateVScrollBarVisibility(SizeF bodySize)
at Telerik.WinControls.UI.GridTableElement.UpdateChildViewHeight(Int32 delta)
at Telerik.WinControls.UI.GridTableElement.Update_GroupingChanged(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
at Telerik.WinControls.UI.GridTableElement.UpdateCore(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
at Telerik.WinControls.UI.GridViewTemplate.UpdateUI(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
at Telerik.WinControls.Data.ExpressionHelper.GroupByExpressionsChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ExpressionFieldCollection`1.NotifyListenersCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.WinControls.Data.ObservableCollection`1.OnCollectionReset(IList oldItems)
at Telerik.WinControls.Data.ObservableCollection`1.ClearItems()
at Telerik.WinControls.Data.ItemObservableCollection`1.ClearItems()
at System.Collections.ObjectModel.Collection`1.Clear()
at LeaseTracker.Views.TrackerGrid.LoadGridData() in F:\Projects\LeaseTracker\LeaseTrackerProj\LeaseTracker\Views\TrackerGrid.cs:line 1057
NOTE : I was having similar errors with LargeChange here -> http://www.telerik.com/community/forums/winforms/forms-and-dialogs/minimizing-radform-largechange-error.aspx
I have not had time to reproduce this in a smaller application as yet, but they may be linked so I am referencing it here just in case.