我有一个带有一堆列的Janus网格。我目前有按功能分组,只需将列拖到顶部即可根据任何列对网格进行分组。
假设我按“国家/地区”列分组。现在我从视图中删除“Country”列。此时我仍然按“国家/地区”分组网格。现在,当我在网格外拖动国家/地区组以删除分组时,我的应用程序崩溃了。
我收到以下崩溃日志。
请帮助。 Janus文件很糟糕。
************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at Janus.Data.JanusCollectionBase.System.Collections.IList.get_Item(Int32 index)
at Janus.Data.JanusGroupCollectionBase.BaseGet(Int32 index)
at Janus.Windows.GridEX.GridEXTable.f(Graphics , GridEXRow , JanusRow , GridEXFormatStyle , Int32 )
at Janus.Windows.GridEX.GridEX.a(Graphics , Boolean )
at Janus.Windows.GridEX.GridEX.a(Graphics )
at Janus.Windows.GridEX.GridEX.t()
at Janus.Windows.GridEX.GridEX.GetCellBounds(Int32 rowPosition, GridEXColumn column)
at Janus.Windows.GridEX.GridEX.bz()
at Janus.Windows.GridEX.Data.JNSAB.OnSuspendRowManagerIndex()
at Janus.Data.JanusRowManager.SuspendIndex()
at Janus.Data.DataSourceManager.a(JanusTableBase )
at Janus.Data.JanusTableBase.OnGroupSettingsChanged(CollectionChangeType change, JanusGroupBase group)
at Janus.Data.JanusTableBase.Janus.Data.ICollectionOwner.OnCollectionChanged(Object collection, CollectionChangeType change, Object item)
at Janus.Data.JanusCollectionBase.OnRemoveComplete(Int32 index, Object value)
at Janus.Windows.GridEX.GridEXGroupCollection.OnRemoveComplete(Int32 index, Object value)
at Janus.Data.JanusCollectionBase.System.Collections.IList.RemoveAt(Int32 index)
at Janus.Data.JanusCollectionBase.System.Collections.IList.Remove(Object value)
at Janus.Windows.GridEX.GridEXGroupCollection.Remove(GridEXGroup group)
at Janus.Windows.GridEX.GridEX.c(Boolean )
at Janus.Windows.GridEX.GridEX.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
答案 0 :(得分:0)
新版本的Janus修复了此问题。
答案 1 :(得分:0)
try
{
gdRPFecha.RootTable.Groups.Clear();
}
catch (Exception error)
{
}
为我工作