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.

Moving Columns bug

Thread ID:

Created:

Updated:

Platform:

Replies:

40776 Feb 13,2006 10:25 AM Feb 16,2006 11:29 AM Windows Forms 6
loading
Tags: Grouping
Theo Danzfuss
Asked On February 13, 2006 10:25 AM

Hi, I am experiencing weird behaviour in my GridGroupingControl when adding related grids to a record. The problems are as follows: 1) If I have no related grids on my record then the Move column works correctly. BUT As soon as I add more than one Related Grid to a record The MoveColumn Pointers (the red arrows which shows where the column will be moved next) is offset by the exact amount of Related grids that I have in my GridGrouping Control.See my attached picture. 2) When I have more than one related grid on a record and I double click on the column to resize it, it also seems as though it uses the incorrect Column index - It resizes column one to the size that column (1+#of related Grids) should have been. Can you please verify this problem and if possible give me a possible cause/solution. Regards, Theo Danzfuss

Grid_Move_Bug.zip

stanleyj [Syncfusion]
Replied On February 14, 2006 12:42 AM

Hi Theo, Can you reproduce such behavior in this sample, I tried in 4.1.0.50. Best regards, Stanley

stanleyj [Syncfusion]
Replied On February 14, 2006 01:01 AM

Hi Theo, I could see the behavior when more columns are present, thanks for your pointers. Sorry for the inconvenience caused. Regards, Stanley

Theo Danzfuss
Replied On February 14, 2006 02:18 AM

Is there a workaround? Maybe overriding some event and manually moving the arrows (YUK!)? When only one related grid is present it seems to work fine, but unfortunatly I have scenarios where there are +20 related grids - you can imagine the confusion... Regards TD >Hi Theo, > >I could see the behavior when more columns are present, thanks for your pointers. > >Sorry for the inconvenience caused. > >Regards, >Stanley

stanleyj [Syncfusion]
Replied On February 14, 2006 02:33 AM

Hi Theo, Sorry for the inconvenience. To be precise, this issue is seen in previous versions of Grid. But this has been fixed in version 4.1. Best regards, Stanley

Theo Danzfuss
Replied On February 14, 2006 02:41 AM

Upgrading is not an option for us right now - The application has already passed user acceptance, and no major upgrades are allowed at this stage. Could you provide us with a workaround? TD >Hi Theo, > >Sorry for the inconvenience. > >To be precise, this issue is seen in previous versions of Grid. But this has been fixed in version 4.1. > >Best regards, >Stanley

Administrator [Syncfusion]
Replied On February 16, 2006 11:29 AM

Hi Theo, There is unfortunately no workaround possible – but you can make changes to the source code and recompile the grid.grouping.windows assembly. We made the following two changes in our grid.grouping.windows code base to fix the problem: Replace this method in GridDragGroupHeader.cs: public Point GetRedArrowIndicatorLocation(bool inGroupDropArea, GridColumnDescriptor cd) { if (inGroupDropArea) { int num = 0; if (cd != null) num = TableDescriptor.GroupedColumns.IndexOf(cd.MappingName); int colIndex = GridGroupDropArea.Model.FieldToColIndex(num); Rectangle r = GridGroupDropArea.RangeInfoToRectangle(GridRangeInfo.Cell(GroupDropAreaRowIndex, colIndex)); Point pt = grid.IsRightToLeft() ? new Point(r.Right, r.Top) : r.Location; return GridGroupDropArea.GridPointToScreen(pt); } else { if (cd != null) { GridRangeInfo range = grid.Table.GetRangeOfHeaderColumnDescriptor(cd); if (!range.IsEmpty) { int colIndex = range.Left; Rectangle r = grid.RangeInfoToRectangle(GridRangeInfo.Cell(range.Top, colIndex)); Point pt = grid.IsRightToLeft() ? new Point(r.Right, r.Top) : r.Location; return grid.GridPointToScreen(pt); } } return Point.Empty; } } Replace this method in GridTable.cs: internal GridRangeInfo GetRangeOfHeaderColumnDescriptor(GridColumnDescriptor column) { int firstHeaderRowIndex = GetRangeOfColumnHeaderSection().Top; int resultRow; int resultCol; if (TableDescriptor.ColumnToRowColIndex(column.MappingName, out resultRow, out resultCol)) { int offset; int d = (ParentTableDescriptor.Relations.NestedCount > 0) ? 1 : 0; if (resultCol > 0) offset = TableDescriptor.GroupedColumns.Count + d + 1; else offset = 1; return GridRangeInfo.Cell(firstHeaderRowIndex+resultRow, offset+resultCol); } return GridRangeInfo.Empty; } Stefan

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.

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.

;