ST
stanleyj
Syncfusion Team
February 14, 2006 05:42 AM UTC
Hi Theo,
Can you reproduce such behavior in this
sample, I tried in 4.1.0.50.
Best regards,
Stanley
ST
stanleyj
Syncfusion Team
February 14, 2006 06:01 AM UTC
Hi Theo,
I could see the behavior when more columns are present, thanks for your pointers.
Sorry for the inconvenience caused.
Regards,
Stanley
TD
Theo Danzfuss
February 14, 2006 07:18 AM UTC
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
ST
stanleyj
Syncfusion Team
February 14, 2006 07:33 AM UTC
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
TD
Theo Danzfuss
February 14, 2006 07:41 AM UTC
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
AD
Administrator
Syncfusion Team
February 16, 2006 04:29 PM UTC
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