Hi Vinod,
Issue 1: Remove the columns in a NestedTable.
>>>>>>
You can use the VisibleColumns collection to remove the column in a grid. Refer the below code.
GridTableDescriptor td = gridGroupingControl1.GetTableDescriptor("ChildTableName");
td.VisibleColumns.Remove("ChildColumnNameHere");
Issue 2: FillLeftColumn in Nested Table.
>>>>>>
You need to handle the QueryColWidth event for nestedtable and set width of the leftcolumn. This code will work for nested tables also.
this.grid.GetTableModel("MyChildTable").QueryColWidth += new GridRowColSizeEventHandler(GridColSizeHelper_QueryColWidth);
this.grid.GetTableModel("MyGrandChildTable").QueryColWidth += new GridRowColSizeEventHandler(GridColSizeHelper_QueryColWidth);
void GridColSizeHelper_QueryColWidth(object sender, GridRowColSizeEventArgs e)
{
switch (_colSizeBehavior)
{
case GridColSizeBehavior.FillLeftColumn:
GridTableModel Model = sender as GridTableModel;
string Name = Model.Table.TableDescriptor.Name;
GridTableControl tc = this.grid.GetTableControl(Name);
int FrozenColIndex = tc.GetFirstScrollableCol();
if (e.Index == FrozenColIndex)
{
int ParentIndentColumn = Name != "MyGrandChildTable" ? 0 : 3;
int indentCols = (Model.GetColumnIndentCount() + ParentIndentColumn) * this.grid.TableOptions.IndentWidth;
int leftPiece = Model.ColWidths.GetTotal(0, FrozenColIndex - 1);
int rightPiece = Model.ColWidths.GetTotal(FrozenColIndex + 1 , Model.ColCount);
e.Size = this.grid.ClientSize.Width - leftPiece - rightPiece - indentCols;
e.Handled = true;
}
break;
default:
break;
}
}
Issue 3: Resizing of ChildColumn
>>>>>>
The reason is that you are setting the TrackWidthOfParentColumn property for childtable in a grid. This property prevents the resizing of the childtable column in a grid.
Please refer to the attached sample for implementation and let me know if this helps.
ModifiedGCC_FrozenColumns.zipBest regards,
Haneef