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

Grid problem with v.2.1.0.15

Thread ID:

Created:

Updated:

Platform:

Replies:

19505 Sep 28,2004 08:21 AM UTC Oct 5,2004 07:37 AM UTC Windows Forms 4
loading
Tags: GridControl
Michael Mann
Asked On September 28, 2004 08:21 AM UTC

Hi, since we are using Syncfusion v.2.1.0.15 including the patch 2.1.15 the following code doesn''t work anymore: // first increase the rowcount (grid now hast 2 rows) gridControlFundAttributes.RowCount++; // indexToStart is 2 gridControlFundAttributes.Rows.Hidden[indexToStart] = true; gridControlFundAttributes[indexToStart, 1].HorizontalAlignment = GridHorizontalAlignment.Left; gridControlFundAttributes[indexToStart, 1].BackColor = FISConstants.GridDataColor; gridControlFundAttributes[indexToStart, 1].Font.Bold = true; gridControlFundAttributes[indexToStart, 1].Text = allGroupData.Name; // this statement produces the following error: // allGroupData is a business object gridControlFundAttributes[indexToStart, 0].Tag = allGroupData; the stack trace produces the following error: Caught an exception: >>> >>> Object reference not set to an instance of an object. >>> >>> at Syncfusion.Windows.Forms.Grid.GridModel.SetCellInfo(Int32 rowIndex, Int32 colIndex, GridStyleInfo style, StyleModifyType modifyType, Boolean dontRaiseSaveCellInfoEvent, Boolean copyReferenceOnly) >>> at Syncfusion.Windows.Forms.Grid.GridModel.SetCellInfo(Int32 rowIndex, Int32 colIndex, GridStyleInfo style, StyleModifyType modifyType) >>> at Syncfusion.Windows.Forms.Grid.GridModel.ChangeCells(GridRangeInfo range, GridStyleInfo[] cellsInfo, StyleModifyType modifyType) >>> at Syncfusion.Windows.Forms.Grid.GridModel.Syncfusion.Windows.Forms.Grid.IGridVolatileDataContainer.ChangeCell(Int32 rowIndex, Int32 colIndex, GridStyleInfo style) >>> at Syncfusion.Windows.Forms.Grid.GridVolatileData.set_Item(Int32 rowIndex, Int32 colIndex, GridStyleInfo value) >>> at Syncfusion.Windows.Forms.Grid.GridStyleInfoIdentity.OnStyleChanged(StyleInfoBase style, StyleInfoProperty sip) >>> at Syncfusion.Styles.StyleInfoBase.OnStyleChanged(StyleInfoProperty sip) >>> at Syncfusion.Windows.Forms.Grid.GridStyleInfo.OnStyleChanged(StyleInfoProperty sip) >>> at Syncfusion.Styles.StyleInfoBase.SetValue(StyleInfoProperty sip, Object value) >>> at Syncfusion.Windows.Forms.Grid.GridStyleInfo.set_Tag(Object value) Any hints, tips, fixes I would appreciate - because it definitely worked before v.2.1.0.15. Thanks in advance Michael Mann

Michael Mann
Replied On September 28, 2004 08:24 AM UTC

One additional note: ColCount is set to 3

Administrator [Syncfusion]
Replied On September 28, 2004 09:22 AM UTC

Exactly what version was the code working for (2.1.0.9 or something else?)? I tried to see the problem in this little sample using a non-virtual GridControl, and it seems to be working as expected? I assume your grid is a GridControl? Are you using it in a virtual manner? ForumTag_4991.zip

Michael Mann
Replied On September 30, 2004 10:13 AM UTC

The version it was running before was v.2.1.0.9. Yes, I am using a gridControl in a derived way. It''s used quite often, but in two of x cases it doesn''t work. And only in that case the whole app crashes. The derived control overrides just a few OnXXXXXX methods, nothing special. Do you have a guess? I''m trying to construct a sample app to provide some source Michael Mann

Administrator [Syncfusion]
Replied On October 5, 2004 07:37 AM UTC

Now I got the problem. The application failed when an object was set as the tag object in the grid. Recent changes to that object in the Clone implementation caused the failure. That means when the object''s Clone() method has been invoked, the application failed. So, this issue can be closed. Thanks for the help Michael

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

;