AD
Administrator
Syncfusion Team
July 8, 2005 03:55 PM UTC
This WrapRow property is not currently supported in GridGroupingControl as it uses a different navigation architecture that knows about nested tables and groups that are not needed in the other grids we have.
So for now, if you want to wrap the row, you will have to handle the TableControlMoveCurrentCellDirection event. Here is a try at this.
private void groupingGrid1_TableControlMoveCurrentCellDirection(object sender, GridTableControlMoveCurrentCellDirectionEventArgs e)
{
if(e.Inner.Direction == GridDirectionType.Right &&
this.groupingGrid1.TableModel.Options.WrapCellBehavior == GridWrapCellBehavior.WrapRow)
{
GridCurrentCell cc = e.TableControl.CurrentCell;
GridTableCellStyleInfo style = e.TableControl.Model[cc.RowIndex, cc.ColIndex];
GridColumnDescriptor col = style.TableCellIdentity.Column;
GridTableDescriptor tableDescriptor = style.TableCellIdentity.Table.TableDescriptor;
if(col!= null && tableDescriptor.VisibleColumns.IndexOf(col.Name) == tableDescriptor.VisibleColumns.Count-1)
{
if(e.Inner.RowIndex < e.TableControl.Model.RowCount)
{
e.TableControl.Table.CurrentRecord.SetCurrent(tableDescriptor.VisibleColumns[0].Name);
e.TableControl.Table.CurrentRecordManager.Navigate(e.TableControl.Table.CurrentRecord, 1);
e.Inner.Handled = true;
}
}
}
}