Why my ultragrid will happne a "X" cross? I am using Infragistics.Win.UltraWinGrid.v3.2.dll
Please advice.
anyone?
finally i can debugger to debug the error is from this line of code
If frmMDI.UltraTabbedMdiManager1.TabGroups.Count > 0 Then For i As Integer = 0 To frmMDI.UltraTabbedMdiManager1.TabGroups(0).Tabs.Count - 1 If frmMDI.UltraTabbedMdiManager1.TabGroups(0).Tabs(i).Form.GetType.Equals(frmLifter.GetType) Then If frmMDI.UltraTabbedMdiManager1.TabGroups(0).Tabs(i).Form.Text = LifterId Then Dim F As frmLifter = CType(frmMDI.UltraTabbedMdiManager1.TabGroups(0).Tabs(i).Form, frmLifter) If Not F.grdAlarm.DataSource Is Nothing Then Dim DTAlarm As DataTable = CType(F.grdAlarm.DataSource, DataTable) DTAlarm.Rows.Add(New Object() {CDate(DT), StatusId, StatusMsg, BackColor.ToArgb}) F.grdAlarm.DataSource = DTAlarm 'If DTAlarm.Rows.Count <> 0 Then F.grdAlarm.ActiveRow = F.grdAlarm.Rows(F.grdAlarm.Rows.Count - 1) F.lblAlarm.Text = StatusMsg F.lblAlarm.BackColor = BackColor F.LatestStatusIsBlinking = IsBlinking F.LatestStatusColor = BackColor F.LatestStatusDT = DT frmMDI.tsslStatus.Text = DT & " " & LifterId & ":" & StatusMsg 'End If End If End If End If Next End If
when it come to that line
Dim DTAlarm As DataTable = CType(F.grdAlarm.DataSource, DataTable)
it show me: Datatable internal index is corrupted: 13
what is the problem?
You should report this to Infragistics Developer Support. Submit an incident to Infragistics Developer Support
This issue is being reported and I see that it is spreading.
I would like to know if all users who have this issue are currently using Vista with the latest patches as it does not appear with our XP installations.
Yes, I'm also having this issue. My grid is bound to a datatable. Then I periodically re-fetch the data for that table and show the latest data on the grid. I am using BackgroundWorker to do the fetaching. Recently, it keeps getting 'Big Red X' randomly since last Novemember (if my memo is right). Following is the stack trace for the exception. I am using VS2005, .Net Framework 2. Our product is installed in XP Pro with SP2.
Please let me know whether this 'Red Cross' issue is fixed or not. Thanks!
Fei.
System.Data at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) at System.Data.DataView.GetRecord(Int32 recordIndex) at System.Data.DataView.CreateChildView(DataRelation relation, Int32 recordIndex) at System.Data.DataRelationPropertyDescriptor.GetValue(Object component) at Infragistics.Win.UltraWinGrid.RowsCollection.get_Data_List() at Infragistics.Win.UltraWinGrid.RowsCollection.get_BindingList() at Infragistics.Win.UltraWinGrid.RowsCollection.SyncRows() at Infragistics.Win.UltraWinGrid.RowsCollection.EnsureNotDirty() at Infragistics.Win.UltraWinGrid.ScrollCountManagerSparseArray.VerifyAgainstScrollVersion() at Infragistics.Win.UltraWinGrid.RowsCollection.GetVisibleRowCount(IncludeRowTypes includeRowTypes) at Infragistics.Win.UltraWinGrid.UltraGridRow.HasChild(UltraGridBand band, Boolean excludeHidden, IncludeRowTypes includeRowTypes) at Infragistics.Win.UltraWinGrid.UltraGridRow.get_HasExpansionIndicator() at Infragistics.Win.UltraWinGrid.RowColRegionIntersectionUIElement.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UltraWinGrid.RowColRegionIntersectionUIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused) at Infragistics.Win.UIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize) at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) at Infragistics.Win.UltraWinGrid.UltraGridUIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) at Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe) at Infragistics.Win.UltraWinGrid.UltraGrid.OnPaint(PaintEventArgs pe) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.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)
If this is happening and your application is using threading, then it's probably no big mystery. Seemingly "random" crashes like this are almost always the result of using multiple threads improperly and not correctly marshalling the data across from the background thread to the UI thread.
It does not appear that infragistics are taking our issues seriously, their answer "your problem, you deal with it, just keep paying the licence fees."
Our licence is up for renewal and we are now looking elsewhere for a provider that is more client focused and actually gets off his backside to support his clients.
Not a good experience so far with infragistics.
There hasn't been any activity in this thread for a while. But I post a comment anyway:
Today I had problems with the "red cross". Had similar problem some time a go too. Then it was a cross-threading problem. I was pretty sure it was now too, but I couldn't find the bug.
In form event handlers that have a chance of getting events from other threads than the gui thread I always use the test:
this.Invoke(<my delegate to the same method as the current one>);
else
{ // do my binding }
System.Threading.Thread.CurrentThread.ManagedThreadId to find out IF my grid rebinding method really was executing on the same thread every time. And it was not! I guess you could put this printout in a grid's paint event handler. I put it in my one and only method where I rebind the datasource for the grid.
The reason for my bug was that I testet for "this.InvokeRequired" and it returned false when it should have returned true. But when I changed it to test for the grid in stead (or in my case the user control containing the grid) it correctly started returning true. So I had to change it to:
messageListControl1.Invoke(<my delegate to the same method as the current one>);
Result: my grid binding now always occurs on the gui thread every time and now everything works fine.
One comment to fei here: even if you THINK you don't do any gui stuff in your background worker you could actually be doing it anyway. If your datasource object is bound to the grid while you try to change the object in your background worker, then I guess a sync between the object and the grid will occur and a gui paint/invalidation will occur.
Ludvix
hcox said:It does not appear that infragistics are taking our issues seriously, their answer "your problem, you deal with it, just keep paying the licence fees." Our licence is up for renewal and we are now looking elsewhere for a provider that is more client focused and actually gets off his backside to support his clients. Not a good experience so far with infragistics.
I really don't think this is an accurate characterization of my responses here. I cannot simply wave a magic wand and fix this issue or even determine it's cause. All I can do here on a forum post is use my experience and knowledge to try to guess what the problem might be and offer a possible course of action.
In my experience, the issue desribed above is almost certainly an issue with the improper use of threading. The exception is likely occurring because the grid is trying to access data at a point where the data is out of synch because it has not been properly marshalled to the UI Thread. I could be wrong. But without a call stack or a sample application, that's the best guess I can make.
I cannot duplicate all possible documentation on using threads here in this forum, nor would it make any sense to do so, since this has nothing specifically to do with the grid control, it's a general programming technique in DotNet development.
I suggested no less than three times in this thread that the developers report these problems to Infragistics Developer support and submit sample applications so that the developer support reps can duplicate the problem and try to determine if it's an issue with the grid control.
What other assistance do you imagine I can offer that I am (for some unknown reason) holding back?