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.
Unfortunately, activation email could not send to your email. Please try again.

Alignement in gcci

Thread ID:

Created:

Updated:

Platform:

Replies:

37984 Dec 3,2005 07:04 AM Dec 3,2005 10:14 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 3, 2005 07:04 AM

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 08:26 AM

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 10:14 AM

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.

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.

;