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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Alignement in gcci

Thread ID:

Created:

Updated:

Platform:

Replies:

37984 Dec 3,2005 12:04 PM UTC Dec 3,2005 03:14 PM UTC WinForms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 3, 2005 12:04 PM UTC

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

Administrator [Syncfusion]
Replied On 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;
		}
	}
}

Administrator [Syncfusion]
Replied On 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;
>		}
>	}
>}
>

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.

Warning Icon 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.Close Icon

;