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.
Syncfusion Feedback

Problems with GridGroupingControl Urgent

Thread ID:

Created:

Updated:

Platform:

Replies:

53551 Dec 15,2006 08:11 AM UTC Jul 18,2008 09:10 PM UTC WinForms 17
loading
Tags: GridControl
Michael
Asked On December 15, 2006 08:11 AM UTC

Hallo,

I am using Syncfusion Essential Studio 4.3.0.30 and Microsoft .Net Framework 2.0. And I have many problems with the GridGroupingControl. Witch I use in a hierarchial view with an dataset as source.
My Table hierarchy looks like this:

Table1
|
|---Table2
| |
| |---Table3
| |
| |---Table4
| |
| |---Table5
| |
| |---Table6
|---Table4
|
|---Table5
|
|---Table6

I provide also a tree who displays the hierarchy of the GridControl. When you select one or more records in the tree(only of one hierarchy level) for example from table3 an record filter is applied on table3 with the ids from the selected records of the tree. All parent table elements are blind out(table1 and table2). When record are selected from the same hierarchy level but from different groups all group Headers are blind out beside the header of the top group. this works not so bad but I have a few problems:

=== 1.Problem ===
My first problem is that I can not access the gridColumnHeaderSections and the AddNewRecordSections of the last table(table6) in the hierarchy in all other tables it works fine.
What can I do to access all headers of all groups?

I access the sections like this:

For Each group As Syncfusion.Grouping.Group In currentElement.ParentChildTable.ParentGroup.Groups
For Each section As Section In group.Sections
If TypeOf section Is GridColumnHeaderSection Then
columnHeaderSection = CType(section, ColumnHeaderSection)
If columnHeaderSection.GetChildCount > 0 Then
For Each row As IGridRowHeight In columnHeaderSection.ColumnHeaderRows
row.RowHeight = 0
Next
End If
ElseIf TypeOf section Is AddNewRecordSection Then
addNewRecordSection = CType(section, AddNewRecordSection)
If Not addNewRecordSection.Records Is Nothing Then
For Each addNewRecord As AddNewRecordEx In addNewRecordSection.Records
addNewRecord.RowHeight = 0
For Each row As IGridRowHeight In addNewRecord.RecordRows
row.RowHeight = 0
Next
Next
End If
End If
Next
Next


=== 2.Problem ===
In the last table(table6) in the hierarchy some methods(parentGroup.ParentGroup.Groups.IndexOf(group)) calls causes an notSupportedException but the methods works anyway, in all other tables its no problem.

For Each group As Syncfusion.Grouping.Group In groups
If group.ParentChildTable Is Nothing Then
firstGroup = group
Exit For
Else
currentIndex = parentGroup.ParentGroup.Groups.IndexOf(group)
Hier Passiert eine Exception: "Die angegebene Funktion wird nicht unterstützt"
If currentIndex >= 0 AndAlso currentIndex < firstGroupIndex Then
firstGroupIndex = currentIndex
firstGroup = group
End If
End If
Next

=== 3.Problem ===
Very often an exception occures at runtime that crashes the hole programm. I can not catch this exception although I have an global exception handler. It occurres in the Syncfusion.Collections.BinaryTree.TreeTableWithCounter.
Here are the exception details:

System.ArgumentOutOfRangeException:

Message:
"Count = 10 FilteredRecordCount = 0 YAmountCount = 10 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0 out of range Count = 1 FilteredRecordCount = 0 YAmountCount = 0 ElementCount = 1 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0\r\nParametername: searchPosition"

ParamName:
"searchPosition"

Source:
"Syncfusion.Shared.Base"

StackTrace:
" bei Syncfusion.Collections.BinaryTree.TreeTableWithCounter.GetEntryAtCounterPosition(ITreeTableCounter start, ITreeTableCounter searchPosition, Int32 cookie, Boolean preferLeftMost)\r\n bei Syncfusion.Collections.BinaryTree.TreeTableWithCounter.GetEntryAtCounterPosition(ITreeTableCounter searchPosition, Int32 cookie, Boolean preferLeftMost)\r\n bei Syncfusion.Grouping.Internals.ElementTreeTable.GetEntryAtCounterPosition(ITreeTableCounter searchPosition, Int32 counterKind, Boolean leftMost)\r\n bei Syncfusion.Grouping.Internals.ElementTreeTable.GetEntryAtCounterPosition(ITreeTableCounter searchPosition, Boolean leftMost)\r\n bei Syncfusion.Grouping.Internals.ElementTreeTable.GetEntryAtCounterPosition(ITreeTableCounter searchPosition)\r\n bei Syncfusion.Grouping.Internals.ElementHelper.GetEntryAtCounterPosition(ElementTreeTable table, ITreeTableCounter counter)\r\n bei Syncfusion.Grouping.Internals.ElementHelper.GetEntryAtCounterPosition(Element el, ITreeTableCounter counter)\r\n bei Syncfusion.Grouping.Internals.ElementHelper.GetElementAtCounterPosition(Element el, ITreeTableCounter counter)\r\n bei Syncfusion.Grouping.Internals.ElementHelper.__FindElement(Table _table, ITreeTableCounter index, Type t, Boolean stepInNestedTables)\r\n bei Syncfusion.Grouping.Internals.ElementHelper.FindElement(Table _table, ITreeTableCounter index, Boolean stepInNestedTables)\r\n bei Syncfusion.Grouping.RuntimeElementsInTableCollection.GetItemAtYAmount(Double index)\r\n bei Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.PointToNestedDisplayElement(Point ptClient)\r\n bei Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.OnCellTipsMouseMove(MouseEventArgs e)\r\n bei Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.OnMouseMove(MouseEventArgs e)\r\n bei System.Windows.Forms.Control.WmMouseMove(Message& m)\r\n bei System.Windows.Forms.Control.WndProc(Message& m)\r\n bei Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)\r\n bei Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)\r\n bei Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.WndProc(Message& msg)\r\n bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)\r\n bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)\r\n bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n bei System.Windows.Forms.Application.Run(ApplicationContext context)\r\n bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()\r\n bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()\r\n bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)\r\n bei BMLCI.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:Zeile 81."

TargetSite:
{Syncfusion.Collections.BinaryTree.TreeTableWithCounterEntry GetEntryAtCounterPosition(Syncfusion.Collections.BinaryTree.ITreeTableCounter, Syncfusion.Collections.BinaryTree.ITreeTableCounter, Int32, Boolean)}

Declaring Type:
{Name = "TreeTableWithCounter" FullName = "Syncfusion.Collections.BinaryTree.TreeTableWithCounter"}

FullName:
"Syncfusion.Collections.BinaryTree.TreeTableWithCounter"


I have also tried to use the new Essential Studio Version 4.4.0.51 but the old problems are the same. But in this new version the column text is not anymore the caption of the column in the dataTable of the dataSet it is the mapping name and this is really bad. Is this a bug or can I select somewhere what text is displayed.

mfg Michael

Michael
Replied On December 15, 2006 08:16 AM UTC

Sorry the hierarchy is not displyed correctly here is an image in the attachment.

mfg Michael

Hierarchy1.zip

Administrator [Syncfusion]
Replied On December 15, 2006 10:16 AM UTC

Hi Michael,

Regarding the problem 1 & 2 :

Please refer to the evalution center GridGroupingcontrol Node for more details.
http://www.syncfusion.com/support/evalcenter/default.aspx?cNode=5

Regarding the problem 3:

The reason is that TopDown/BottomUp counter is not intialized properly after setting the RowHeight to "ZERO". Before setting the RowHeight of the record to "ZERO"in a grid, you can call the Record.InvalidateCounterBottomUp() and Record.InvalidateCounterTopDown() method. Let me know if this helps.

Record.InvalidateCounterTopDown();
Record.InvalidateCounterBottomUp()

Best Regards,
Haneef

Michael
Replied On December 15, 2006 12:01 PM UTC

Thanks for your fast help but:

Problem 1 & 2:
I could not find anything that helps me to slove the problem on this page http://www.syncfusion.com/support/evalcenter/default.aspx?cNode=5

Problem 3:
Me.InvalidateCounterTopDown(True) and Me.InvalidateCounterBottomUp() does not change anything.

mfg Michael

Administrator [Syncfusion]
Replied On December 18, 2006 11:37 AM UTC

Hi Michael,

We tried to reproduce this in V4.x by just implement relations in a Grid, but could not get this issue. Maybe I am not following the steps that you are doing. Attached sample working fine here. Can you post a small sample showing this problem or tell us how to see it in the Browser sample/Attached sample?

Here is a sample for implementing it.
Nested_GGC.zip

If you can provide more information, we can try to suggest some solution.

Regards,
Haneef

Michael
Replied On December 18, 2006 04:31 PM UTC

Hallo Haneef

I attached a sample andalso a few images that shows how the grid works.

GridGroupingControl:
With the grid control you can navigate throu all visible hierarchy levels.

TreeViewAdv:
The TreeView has the function to filter rows and hierarchy levels. When you select a node in the tree view, all parent tables are blind out(row height to zero) and the TreeNode has in his tag information about the id of the corresponding grid record, all records except this record are bind out.
In the TreeViev you can select multiple nodes but only in the same level. When multiple nodes are selected form different groups, form hierarchy level 0 up to level 2 only the GridColumnHeader of the top level group is displayd, from level 3 up to level 5 for each group an sepperate header is displayed.
The AddNewRecordRows are blinded out on the hierarchy level of the selected node, on the other levels the AddNewRecordRow is visible.

I found out that when I set the row hight of an AddNewRecordRow to 0. The exception occurres each time I mouve with the mouse over a GridRecordRow.
But the exception occures too when AddNewRecordRow is not set to 0 and I play i little bit with the selection of nodes.

Images:
GGC_Sample1.jpg - GGC_Sample3.jpg Demonstrate how to select.
GGC_Sample4.jpg When a module is selected like and you move with the mouse over the GridRows the exception habbens.
GGC_OutOfRangeException.jpg Is a picture of the exception and the Syncfusion code passage where it happens.

mfg
Michael

GGC_Sample.zip

Administrator [Syncfusion]
Replied On December 19, 2006 11:46 AM UTC

Hi Michael,

We will work out for a solution and let you know the details soon. Thanks for being patience.

Best regards,
Haneef

Michael
Replied On January 9, 2007 07:21 AM UTC

Hallo Haneef

In with time can we expect an solution for this problem? We use the GridGroupingControl in an actual project in our company and we are a little bit under time pressure therefor it were really great when we could get an answer soon.

Best regards,
Michael



Administrator [Syncfusion]
Replied On January 9, 2007 08:43 AM UTC

Hi Michael,

My apologizes for the delay caused on this issue.

I have forwarded this issue onto the grid development team and will let you know the details once I hear back from them.

Thanks for your patience.

Regards,
Haneef

Bernhard
Replied On January 23, 2007 10:07 AM UTC

Hello Haneef,

I'm a Team Member of Michael and now we are in a very critical state of the project because of the bug described by Michael.
We dont know how we can go on in future - should we count on Syncfusion or not because the bug make considerable troubles with our customer.

We have invested many time and money and now we have the described problem with the control - so my question is, when do you intend to solve this bug(next week, next month, next year????). From this information depends the progress in the current project andalso decicions for some future projects (we almost need always this feature).

Please be so kind and give us a answer concerning the process of solving this bug. Is there a special release plan where the solving of our bug is included ??

Thanks in advance
bernhard

Is there

Administrator [Syncfusion]
Replied On January 24, 2007 06:22 PM UTC

Hi Bernhard,

We regret for the inconvenience caused. We have been analyzing the cause and fix for this issue in your code. We will update you the details on this issue on 26 January 07 EST.

Thank you for being patience.
Have a nice day.

Best regards,
Madhan

Administrator [Syncfusion]
Replied On January 29, 2007 05:40 AM UTC

And what about it now. Do you have a fix for the issue ?

Best regards
bernhard

>Hi Bernhard,

We regret for the inconvenience caused. We have been analyzing the cause and fix for this issue in your code. We will update you the details on this issue on 26 January 07 EST.

Thank you for being patience.
Have a nice day.

Best regards,
Madhan

Bernhard
Replied On February 5, 2007 07:33 AM UTC

Hello Madhan,

is there anywhere a solution for our problem - bugfix, new release...

When do you intend to publish a solution

best regards
bernhard

Administrator [Syncfusion]
Replied On February 6, 2007 12:14 AM UTC

Hi Bernhard,

We apologize for the delay in responding to you. Could you please open a D-Trac Incident for the analyzed report and solution (fix) for this issue?

Thank you for being patience.
Have a nice day.

Best regards,
Madhan

Michael
Replied On February 6, 2007 05:26 AM UTC

Hallo Madhan,

Thanks for your response.
I have created a new incident the id is 31627 the subject is "Problems with GridGroupingControl".

Best regards
Michael

Dmitriy
Replied On February 29, 2008 04:49 PM UTC

May I ask if there was a resolution to issue #3 (random exception in GetEntryAtCounterPosition)?

We are getting the same exception randomly.

Thanks,

D


Administrator [Syncfusion]
Replied On March 26, 2008 02:19 PM UTC

Hi Dmitriy,

We regret for the delays in responding to you. The reason for the issue is that the grid tries to access the rows of hidden and accordingly accessing the GetYAmount method throws the ArgumentOutOfRangeException.

The AddNewRecordSection was returning a value of 17 (m_RowHeight was set), but then when the engine tried to get the record row within that AddNewRecordSection all RecordRows had a height of size 0. That’s when the exception occurred then when the engine was trying to step into the AddNewRecordSection and then could not find the associated record row because they all had YAmountCount = 0.

A solution would be to change the following method:
>>>>>>>>>>>Code Snippet<<<<<<<<<<<
Private Sub HideGridRows(ByVal gridTable As GridTable)
''''For Each gridTableModel As GridTableModel In gridTableModels
'''' AddHandler gridTableModel.QueryColWidth, AddressOf Me.TableModel_QueryColWidth
''''Next
For Each element As Element In gridTable.Elements
If TypeOf element Is IGridRowHeight Then
CType(element, IGridRowHeight).RowHeight = 0
If TypeOf element.ParentRecord Is AddNewRecord Then
CType(element.ParentRecord, IGridRowHeight).RowHeight = 0
End If
End If
Next
End Sub
>>>>>>>>>>>Code Snippet<<<<<<<<<<<

This explicitly will also set the height of the AddNewSection when you change its recordrows. That why the height of the AddNewRecordSection and the height of its record rows are the same.

Best regards,
Haneef



Ricky Ling
Replied On July 18, 2008 09:10 PM UTC

We are experiencing this exception. Can this be fixed and provide us with any solution or patch? Please see stack trace below:

2008-07-15 09:16:00,302 [UI Thread] ERROR CapGroup.Etp.Client.View.Common.Grids.EtpGrid - Exception Caught in OnSourceListRecordChangedHandler - RecordChangedEventArgs { RaiseDisplayElementChanged=False, SortedPositionChanged=True, VisibilityChanged=False, GroupsChanged=False, Record=(GridRecordWithValueCache): ReutersSymbol = TII, AssetName = TELMEX INTERNACIONAL SAB DE CV L ADR, BrokerCode = FBNY, TradeBy = LPM, MgrAbbrs = DIF, IFC, LBT, MiDTP, MiLBT, Mirr, NZK, RNH, RPCOM, AuthorizationPrice = 14.74, DisplayLimitPrice = 21, OpenQuantity = 2260300, CompleteQuantity = 9200, AveragePrice = 14.5306641304348, LeavesQuantity = 2251100, Last = 14.58, PercentChange = -2.8, Volume = 354514, PercentComplete = 0.407025616068663, LocationCode = LAT, PriorityCode = B, Tradability = True, MarketCapTypeImage = , CancelFlagImage = , ConfirmFlagImage = , RejectFlagImage = , NotesFlagImage = System.Drawing.Bitmap, DisplayRestrictionPercent = 4.52349488416401, DisplayDirectionsPercent = 25.8588767006529, DisplayPimPercent = , WorkingOrderStatusStr = , USDValue = 32955174, TradeSeparatelyFlagImage = , Bid = 14.57, Ask = 14.59, BidAskSize = 5 x 5, TickImage = System.Drawing.Bitmap, Change = -0.42, USDPrice = 14.58, LastUpdate = 7/15/2008 9:15:57 AM, PercentCompleteNonHold = 0.407025616068663, PendingStatusStr = , BlotterName = Default, CountryCode = MX, CurrencyCode = USD, DisplayAvailableQuantity = 2233848, Region = LATIN AMERICA, CompanyWarnPrice = 15.477, CompanyStopPrice = 16.214, WorkingQuantity = 17252, NonWorkingQuantity = 2233848, HoldQuantity = 0, BuySellCode = B, CgSymbol = TII, CrossingNetWorkShares = 2233848, CrossingNetWorkPrice = 21, CrossingNetWorkSharesState = SystemDefault, CrossingNetWorkPriceState = SystemDefault, IsinNumber = US8796901051, CusipNumber = 879690105, SedolNumber = B39STJ7, BloombergId = TII US, BrokerShortName = CS, NY, BuddySortIndex = 1, StatusCode = ASGN, BrokerAvgPrice = 14.5307, BrokerCompQty = 9200, AveragePriceHeatMapStateInt = 0, NonHoldQuantity = 2260300, DisplayTradeOrderId = 604585435, TradeOrderOca = , WorkingOrderId = , WorkingOrderOca = , AssetIdSideTraderBlotterString = 88334200|B|LPM|0, BrokerIdAssetIdSideTraderBlotterString = , OrderGroupBrokerIdAssetIdSideTraderBlotterString = , BrokerId = , OrderGroupId = , LockedBy = , LockedQty = 0, ReservedQty = 0, OpenPercentAdv = , AvailablePercentAdv = , LastClose = 14.75, Pending = False, MDCurrency = USD, BidMMID = NYS, AskMMID = NYS, High = 14.7, Low = 14.41, Open = 14.7, Close = , ExDividend = , VMA50D = 0, VWAP = , ##parent = , Group=, AddedGroup=, RemovedGroup=, Action=Changed, NewIndex=6, OldIndex=-1 }
System.ArgumentOutOfRangeException: Count = 20 FilteredRecordCount = 0 YAmountCount = 0 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0 out of range Count = 19 FilteredRecordCount = 12 YAmountCount = 382 ElementCount = 29 RecordCount = 27 CustomCount = 0 VisibleCustomCount = 0
Parameter name: 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(ITreeTableCounter searchPosition, Int32 counterKind, Boolean leftMost)
at Syncfusion.Grouping.Internals.ElementHelper.GetEntryAtCounterPosition(Element el, ITreeTableCounter counter)
at Syncfusion.Grouping.Internals.ElementHelper.__FindElement(Table _table, ITreeTableCounter index, Type t, Boolean stepInNestedTables)
at Syncfusion.Grouping.RuntimeElementsInTableCollection.get_Item(Int32 index)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTable.GetTableCellStyle(Int32 rowIndex, Int32 colIndex)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.GetTableViewStyleInfo(Int32 rowIndex, Int32 colIndex)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.GetViewStyleInfo(Int32 rowIndex, Int32 colIndex, Boolean forceQueryCellInfo)
at Syncfusion.Windows.Forms.Grid.GridControlBase.GetCellRenderer(Int32 rowIndex, Int32 colIndex)
at Syncfusion.Windows.Forms.Grid.GridCurrentCell.SetPositionNoActivate(Int32 rowIndex, Int32 colIndex)
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControlOptimizeListChanged.AdjustCurrentCell(Element element, Int32 pos, Int32 visibleCount)
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControlOptimizeListChanged.HandleRemovedElement(DeleteRecordInfo dr, Boolean allowUpdate, Boolean invalidateIfVisible)
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControlOptimizeListChanged.OnGridSourceListRecordChanged(Object sender, RecordChangedEventArgs rce)
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl.OnSourceListRecordChanged(RecordChangedEventArgs e)
at CapGroup.Etp.Client.View.Common.Grids.EtpGrid.OnSourceListRecordChangedHandler(RecordChangedEventArgs e)




>Hi Dmitriy,

We regret for the delays in responding to you. The reason for the issue is that the grid tries to access the rows of hidden and accordingly accessing the GetYAmount method throws the ArgumentOutOfRangeException.

The AddNewRecordSection was returning a value of 17 (m_RowHeight was set), but then when the engine tried to get the record row within that AddNewRecordSection all RecordRows had a height of size 0. That’s when the exception occurred then when the engine was trying to step into the AddNewRecordSection and then could not find the associated record row because they all had YAmountCount = 0.

A solution would be to change the following method:
>>>>>>>>>>>Code Snippet<<<<<<<<<<<
Private Sub HideGridRows(ByVal gridTable As GridTable)
''For Each gridTableModel As GridTableModel In gridTableModels
'' AddHandler gridTableModel.QueryColWidth, AddressOf Me.TableModel_QueryColWidth
''Next
For Each element As Element In gridTable.Elements
If TypeOf element Is IGridRowHeight Then
CType(element, IGridRowHeight).RowHeight = 0
If TypeOf element.ParentRecord Is AddNewRecord Then
CType(element.ParentRecord, IGridRowHeight).RowHeight = 0
End If
End If
Next
End Sub
>>>>>>>>>>>Code Snippet<<<<<<<<<<<

This explicitly will also set the height of the AddNewSection when you change its recordrows. That why the height of the AddNewRecordSection and the height of its record rows are the same.

Best regards,
Haneef







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.

Warning Icon 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.Close Icon

;