Alignement in gcci

Hi i''m using gridGroupingControl How can i align the nestedTables with the parent table (all on the left) on the left and i want also to prevent the user to resize some columns, how can i do that ? Thanks

2 Replies

AD Administrator Syncfusion Team December 3, 2005 01:26 PM UTC

I do not know how you can make all tables flush left in a GridGroupingControl with nested tables. To prevent resizing certain columns, you can handl eteh TableControlResingColumns event.
private void gridGroupingControl1_TableControlResizingColumns(object sender, GridTableControlResizingColumnsEventArgs e)
{
	Point pt = e.TableControl.PointToClient(Control.MousePosition);
	Element el = e.TableControl.PointToNestedDisplayElement(pt);
	if(el != null && el.IsColumnHeader())
	{
		GridColumnHeaderRow row = el as GridColumnHeaderRow;
		int row1 = e.TableControl.Table.DisplayElements.IndexOf(el);
		GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(row1, e.Inner.Columns.Left);
		if(style.TableCellIdentity.Column != null)
		{
			string name = style.TableCellIdentity.Column.Name;
			if(name == "Name")
				e.Inner.Cancel = true;
		}
	}
}


AD Administrator Syncfusion Team December 3, 2005 03:14 PM UTC

It''s works Thank u very much Clay >I do not know how you can make all tables flush left in a GridGroupingControl with nested tables. > >To prevent resizing certain columns, you can handl eteh TableControlResingColumns event. >
>private void gridGroupingControl1_TableControlResizingColumns(object sender, GridTableControlResizingColumnsEventArgs e)
>{
>	Point pt = e.TableControl.PointToClient(Control.MousePosition);
>	Element el = e.TableControl.PointToNestedDisplayElement(pt);
>	if(el != null && el.IsColumnHeader())
>	{
>		GridColumnHeaderRow row = el as GridColumnHeaderRow;
>		int row1 = e.TableControl.Table.DisplayElements.IndexOf(el);
>		GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(row1, e.Inner.Columns.Left);
>		if(style.TableCellIdentity.Column != null)
>		{
>			string name = style.TableCellIdentity.Column.Name;
>			if(name == "Name")
>				e.Inner.Cancel = true;
>		}
>	}
>}
>

Loader.
Up arrow icon