We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

BUG: Unable to cast object of type with gridGroupingControl.TableControl.Refresh()

Thread ID:

Created:

Updated:

Platform:

Replies:

91740 Nov 30,2009 03:23 PM Dec 1,2009 10:08 AM Windows Forms 1
loading
Tags: GridControl
Sergey Merkuriev
Asked On November 30, 2009 03:23 PM

I have following exception of casting type in the grid when I bound collection of following objects to the grid

public class DataItem
{
//public ICollection Attributes { get; private set; }
public IDictionary Reference { get; private set; }
public string Name { get; private set; }
}


Unable to cast object of type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]' to type 'System.Collections.IList'.

at Syncfusion.Grouping.Table.InitUnsortedRecords(Boolean forceParentElement)
at Syncfusion.Grouping.Table.CategorizeElements()
at Syncfusion.Grouping.Table.OnEnsureInitialized(Object sender)
at Syncfusion.Grouping.Element.EnsureInitialized(Object sender, Boolean notifyParent)
at Syncfusion.Grouping.Table.BaseEnsureInitialized(Object sender, Boolean notifyParent)
at Syncfusion.Grouping.Table.EnsureInitialized(Object sender, Boolean notifyParent)
at Syncfusion.Grouping.Record.AdjustRecordRowCount()
at Syncfusion.Grouping.Record.GetVisibleCount()
at Syncfusion.Grouping.Record.GetCounter()
at Syncfusion.Collections.BinaryTree.TreeTableWithCounterEntry.GetCounterTotal()
at Syncfusion.Collections.BinaryTree.TreeTableWithCounter.GetCounterTotal()
at Syncfusion.Grouping.Internals.ElementTreeTable.get_VisibleCount()
at Syncfusion.Grouping.DetailsSection.GetVisibleCount()
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupExtend.OnInitializeVisibleCounters(Group owner, GridGroupOptionsStyleInfo go)
at Syncfusion.Windows.Forms.Grid.Grouping.GridChildTable.OnInitializeVisibleCounters()
at Syncfusion.Grouping.Group.InitVisibleCounters()
at Syncfusion.Grouping.Group.GetVisibleCount()
at Syncfusion.Grouping.NestedTable.GetVisibleCount()
at Syncfusion.Grouping.Element.GetCounter()
at Syncfusion.Collections.BinaryTree.TreeTableWithCounterEntry.GetCounterTotal()
at Syncfusion.Collections.BinaryTree.TreeTableWithCounterBranch.GetCounterTotal()
at Syncfusion.Collections.BinaryTree.TreeTableWithCounter.GetCounterTotal()
at Syncfusion.Grouping.Internals.ElementTreeTable.get_ElementCount()
at Syncfusion.Grouping.RecordNestedTablesPart.GetElementCount()
at Syncfusion.Grouping.Element.GetCounter()
at Syncfusion.Collections.BinaryTree.TreeTableWithCounterEntry.GetCounterTotal()
at Syncfusion.Collections.BinaryTree.TreeTableWithCounterBranch.GetCounterTotal()
at Syncfusion.Collections.BinaryTree.TreeTableWithCounterBranch.GetCounterTotal()
at Syncfusion.Collections.BinaryTree.TreeTableWithCounter.GetCounterTotal()
at Syncfusion.Grouping.Internals.ElementTreeTable.GetCounterTotal()
at Syncfusion.Grouping.Internals.ElementHelper.GetNextElementStepIn(Element el, Int32 cookie, Type finalType, Boolean stepInNestedTables, Table outerTable)
at Syncfusion.Grouping.Internals.ElementHelper.GetNextElementStepIn(Element el, Int32 cookie, Type finalType, Boolean stepInNestedTables, Table outerTable)
at Syncfusion.Grouping.RuntimeElementsInTableCollectionEnumerator.MoveNext()
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.InternalGetFrozenRows()
at Syncfusion.Windows.Forms.Grid.GridControlBase.GetVisibleFrozenRows()
at Syncfusion.Windows.Forms.Grid.GridControlBase._GetClientRow(Int32 rowIndex, Int32 vScrollPos)
at Syncfusion.Windows.Forms.Grid.GridControlBase.GetClientRow(Int32 rowIndex)
at Syncfusion.Windows.Forms.Grid.GridViewLayout.Initialize()
at Syncfusion.Windows.Forms.Grid.GridViewLayout.DemandInitialize()
at Syncfusion.Windows.Forms.Grid.GridControlBase.IsVisibleCell(Int32 rowIndex, Int32 colIndex)
at Syncfusion.Windows.Forms.Grid.GridControlBase.InvalidateRange(GridRangeInfo range, GridRangeOptions options)
at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Refresh()
at Syncfusion.Windows.Forms.Grid.GridControlBase.Refresh(Boolean fromModel)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.Refresh(Boolean fromModel)
at Syncfusion.Windows.Forms.Grid.GridControlBase.Refresh()
at OpsCenter.UI.Editor.Grid.AsbtractGridController.OnCurrentCellActivating(GridCurrentCellActivatingEventArgs e) in C:\Projects\Petris\Chinook\OpsCenter\v5\Trunk\OpsCenter.UI\Editor\Grid\AsbtractGridController.cs:line 356

Lingaraj S [Syncfusion]
Replied On December 1, 2009 10:08 AM

Hi Sergey,

Thank you for your interest in Syncfusion product.

Since it the duplicate issue of the incident 62562. Please follow up with the incident(#62562).

Regards,
Lingaraj S.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;