Hi,
I am using GDBG. For one of the column I have ‘ComboBox’ as cell type. I have attached the code related to the ‘CurrentCellCloseDropDown’ event.
Problem:
When I am at the very last row of the grid (basically new row which doesn’t have any data) and click the dropdown button for that cell but I don’t select anything from the list. I see the list but don’t select any value from list. After clicking on the dropdown button of the cell I click somewhere else which
Triggers the ‘CurrentCellCloseDropDown’ event and I get the following error.
Type: System.ArgumentOutOfRangeException
Message: Specified argument was out of the range of valid values.
Parameter name: Index was out of range. Must be non-negative and less than the size of the collection.
Stack Trace: at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
at FOX.FBC.Planning.PL.PlanningClient.DepartmentBudget.SalaryAdjustmentsUserControl.ValidatePayTypeCode(String& validationMessage) in c:\development\application\fox\fbc\planning\1.0\source\pl\planningclient\departmentbudget\salaryadjustmentsusercontrol.cs:line 880
at FOX.FBC.Planning.PL.PlanningClient.DepartmentBudget.SalaryAdjustmentsUserControl.dgEmployees_CurrentCellCloseDropDown(Object sender, PopupClosedEventArgs e) in c:\development\application\fox\fbc\planning\1.0\source\pl\planningclient\departmentbudget\salaryadjustmentsusercontrol.cs:line 851
at Syncfusion.Windows.Forms.Grid.GridControlBase.OnCurrentCellCloseDropDown(PopupClosedEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridControlBase.RaiseCurrentCellCloseDropDown(PopupClosedEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridDropDownCellImp.DropDownContainerCloseDropDown(Object sender, PopupClosedEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridCellRendererBase.DropDownContainerCloseDropDown(Object sender, PopupClosedEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridComboBoxCellRenderer.ChildClosing(IPopupChild childUI, PopupCloseType popupCloseType)
at Syncfusion.Windows.Forms.PopupControlContainer.OnCloseUp(PopupClosedEventArgs args)
at Syncfusion.Windows.Forms.PopupControlContainer.HidePopup(PopupCloseType popupCloseType)
at Syncfusion.Windows.Forms.PopupControlContainer.VeryifyMouseBasedDeactivation(Control destinationControl, Int32 msg)
at Syncfusion.Windows.Forms.PopupControlContainer.ProcessMouseMessage(Control destination, Int32 msg)
at Syncfusion.Windows.Forms.PopupControlContainer.Syncfusion.Windows.Forms.INeedMouseMoveMessages.MouseMessage(Message& m)
at Syncfusion.Windows.Forms.PopupManager.PreFilterMessage(Message& m)
Source: mscorlib
Please suggest what can I do to prevent this error. Probably I am getting this error due the fact the row is new and I didn’t select from list and trying to validate value in ‘CurrentCellCloseDropDown’ event.
Thanks,
code0.zip