AD
Administrator
Syncfusion Team
June 14, 2005 11:50 PM UTC
I tweaked your code in this sample that uses the TableControlCurrentCellKeyDown event (not CurrentCellKeyDown) to delete the current row.
http://www.syncfusion.com/Support/user/uploads/GGC_ExpressionCOl_1448f651.zip
Will this work in your case?
LJ
Luis Javier Mompart
June 15, 2005 06:44 AM UTC
happens the same,
iam trying to trigger some intermediate event, because i think that some other (event) is accesing the underlying list between deleting and deleted events.
these are my hooked events,
this.TableControl.QueryNextCurrentCellPosition+=new GridQueryNextCurrentCellPositionEventHandler(TableControl_QueryNextCurrentCellPosition);
this.TableControl.CurrentCellDeactivated+=new GridCurrentCellDeactivatedEventHandler(TableControl_CurrentCellDeactivated);
this.TableControl.CurrentCellActivated+=new EventHandler(TableControl_CurrentCellActivated);
this.TableControl.CurrentCellKeyDown+=new KeyEventHandler(TableControl_CurrentCellKeyDown);
this.TableControlCurrentCellKeyDown+=new GridTableControlKeyEventHandler(ReferenciasGrid_TableControlCurrentCellKeyDown);
this.TableControl.CurrentCellValidating += new System.ComponentModel.CancelEventHandler(TableControl_CurrentCellValidating);
this.TableControl.ScrollbarsVisibleChanged+=new EventHandler(TableControl_ScrollbarsVisibleChanged);
this.TableModel.QueryCoveredRange+=new GridQueryCoveredRangeEventHandler(TableModel_QueryCoveredRange);
and i had implemented a custom engine (Factory) to group and operate at the section level.
im starting to realize that need to know more about TableModel (rendering and performance reasons?, some tips?). I think could help
(not seems to help send you source code because of the weight of it).
LJ
Luis Javier Mompart
June 15, 2005 08:37 AM UTC
another stack trace that could focus the issue is that when i scroll the vertical scroll bar i receive:
Count = 0 YAmountCount = 12 FilteredRecordCount = 0 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
Count = 1 YAmountCount = 0 FilteredRecordCount = 0 ElementCount = 2 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
System.ArgumentOutOfRangeException: Count = 0 YAmountCount = 12 FilteredRecordCount = 0 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0 out of range Count = 1 YAmountCount = 0 FilteredRecordCount = 0 ElementCount = 2 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
Nombre del parámetro: searchPosition
at Syncfusion.Collections.BinaryTree.TreeTableWithCounter.GetEntryAtCounterPosition(ITreeTableCounter start, ITreeTableCounter searchPosition, Int32 cookie, Boolean preferLeftMost)
at Syncfusion.Collections.BinaryTree.TreeTableWithCounter.GetEntryAtCounterPosition(ITreeTableCounter searchPosition, Int32 cookie, Boolean preferLeftMost)
at Syncfusion.Grouping.Internals.ElementTreeTable.GetEntryAtCounterPosition(Counter searchPosition, Int32 counterKind, Boolean leftMost)
at Syncfusion.Grouping.Internals.ElementTreeTable.GetEntryAtCounterPosition(Counter searchPosition, Boolean leftMost)
at Syncfusion.Grouping.Internals.ElementTreeTable.GetEntryAtCounterPosition(Counter searchPosition)
at Syncfusion.Grouping.Internals.ElementHelper.GetEntryAtCounterPosition(ElementTreeTable table, Counter counter)
at Syncfusion.Grouping.Internals.ElementHelper.GetEntryAtCounterPosition(Element el, Counter counter)
at Syncfusion.Grouping.Internals.ElementHelper.GetElementAtCounterPosition(Element el, Counter counter)
at Syncfusion.Grouping.Internals.ElementHelper.__FindElement(Table _table, Counter index, Type t, Boolean stepInNestedTables)
at Syncfusion.Grouping.Internals.ElementHelper.FindElement(Table _table, Counter index, Boolean stepInNestedTables)
at Syncfusion.Grouping.RuntimeElementsInTableCollection.GetItemAtYAmount(Double index)
catched at Syncfusion.Grouping.RuntimeElementsInTableCollection.GetItemAtYAmount(Double index) in :line 0
Count = 0 YAmountCount = 12 FilteredRecordCount = 0 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
Count = 1 YAmountCount = 0 FilteredRecordCount = 0 ElementCount = 2 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
Count = 0 YAmountCount = 13 FilteredRecordCount = 0 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
Count = 1 YAmountCount = 0 FilteredRecordCount = 0 ElementCount = 2 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
System.ArgumentOutOfRangeException: Count = 0 YAmountCount = 13 FilteredRecordCount = 0 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0 out of range Count = 1 YAmountCount = 0 FilteredRecordCount = 0 ElementCount = 2 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
Nombre del parámetro: searchPosition
at Syncfusion.Collections.BinaryTree.TreeTableWithCounter.GetEntryAtCounterPosition(ITreeTableCounter start, ITreeTableCounter searchPosition, Int32 cookie, Boolean preferLeftMost)
at Syncfusion.Collections.BinaryTree.TreeTableWithCounter.GetEntryAtCounterPosition(ITreeTableCounter searchPosition, Int32 cookie, Boolean preferLeftMost)
at Syncfusion.Grouping.Internals.ElementTreeTable.GetEntryAtCounterPosition(Counter searchPosition, Int32 counterKind, Boolean leftMost)
at Syncfusion.Grouping.Internals.ElementTreeTable.GetEntryAtCounterPosition(Counter searchPosition, Boolean leftMost)
at Syncfusion.Grouping.Internals.ElementTreeTable.GetEntryAtCounterPosition(Counter searchPosition)
at Syncfusion.Grouping.Internals.ElementHelper.GetEntryAtCounterPosition(ElementTreeTable table, Counter counter)
at Syncfusion.Grouping.Internals.ElementHelper.GetEntryAtCounterPosition(Element el, Counter counter)
at Syncfusion.Grouping.Internals.ElementHelper.GetElementAtCounterPosition(Element el, Counter counter)
at Syncfusion.Grouping.Internals.ElementHelper.__FindElement(Table _table, Counter index, Type t, Boolean stepInNestedTables)
at Syncfusion.Grouping.Internals.ElementHelper.FindElement(Table _table, Counter index, Boolean stepInNestedTables)
at Syncfusion.Grouping.RuntimeElementsInTableCollection.GetItemAtYAmount(Double index)
Count = 0 YAmountCount = 13 FilteredRecordCount = 0 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
Count = 1 YAmountCount = 0 FilteredRecordCount = 0 ElementCount = 2 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
Count = 0 YAmountCount = 16 FilteredRecordCount = 0 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
Count = 1 YAmountCount = 0 FilteredRecordCount = 0 ElementCount = 2 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
System.ArgumentOutOfRangeException: Count = 0 YAmountCount = 16 FilteredRecordCount = 0 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0 out of range Count = 1 YAmountCount = 0 FilteredRecordCount = 0 ElementCount = 2 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
Nombre del parámetro: searchPosition
at Syncfusion.Collections.BinaryTree.TreeTableWithCounter.GetEntryAtCounterPosition(ITreeTableCounter start, ITreeTableCounter searchPosition, Int32 cookie, Boolean preferLeftMost)
at Syncfusion.Collections.BinaryTree.TreeTableWithCounter.GetEntryAtCounterPosition(ITreeTableCounter searchPosition, Int32 cookie, Boolean preferLeftMost)
at Syncfusion.Grouping.Internals.ElementTreeTable.GetEntryAtCounterPosition(Counter searchPosition, Int32 counterKind, Boolean leftMost)
at Syncfusion.Grouping.Internals.ElementTreeTable.GetEntryAtCounterPosition(Counter searchPosition, Boolean leftMost)
at Syncfusion.Grouping.Internals.ElementTreeTable.GetEntryAtCounterPosition(Counter searchPosition)
at Syncfusion.Grouping.Internals.ElementHelper.GetEntryAtCounterPosition(ElementTreeTable table, Counter counter)
at Syncfusion.Grouping.Internals.ElementHelper.GetEntryAtCounterPosition(Element el, Counter counter)
at Syncfusion.Grouping.Internals.ElementHelper.GetElementAtCounterPosition(Element el, Counter counter)
at Syncfusion.Grouping.Internals.ElementHelper.__FindElement(Table _table, Counter index, Type t, Boolean stepInNestedTables)
at Syncfusion.Grouping.Internals.ElementHelper.FindElement(Table _table, Counter index, Boolean stepInNestedTables)
at Syncfusion.Grouping.RuntimeElementsInTableCollection.GetItemAtYAmount(Double index)
and cant handle again
AD
Administrator
Syncfusion Team
June 15, 2005 09:43 AM UTC
Just something to try.
In your keydown handler where you handle teh delete key, try setting
e.Inner.Handled = true;
to make sure nothing else happens because of teh delete key.
If that does not affect things, you might comment out the lines where you subscribe to those events to see if that makes the problem go away. If it does, then add them back one at the time to home in on what event(s) is affecting things.
Are you using 3.2.1.0? I assume the sample above deleted without a problem, correct?