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

How-To (GridGrouingControl and GridDataBoundGrid)

Thread ID:

Created:

Updated:

Platform:

Replies:

29111 May 17,2005 01:41 PM UTC May 19,2005 03:35 PM UTC WinForms 2
loading
Tags: GridControl
Prof DISSOU Jamâl-Dine
Asked On May 17, 2005 01:41 PM UTC

Hi, Please I would like to know : On GridGrouingControl : 1. How to set the tab key behaviour on GridGroupingControl (When the user tabs to the end of a row, go to the next row. When the user tabs to the last cell in the last row, go to the next control in the tab order on the form) ?. 2. How to make a column''s TabStop 3. How to make a column''s BackColor 4. How to make a cell to display "..." if it is not wide enough to have the whole text 5. How do efficiently modify the underlying DataSource when its bound to the GridGroupingControl ? On GridDataBoundGrid : 1. How to make a column''s TabStop 2. How to make a column''s BackColor Best regards, Jamâl-Dine DISSOU

Administrator [Syncfusion]
Replied On May 17, 2005 05:32 PM UTC

1) Currently, there are no property settings available to manage this. At this point, you would have to handle an event, TableControlMoveCurrentCellDirection, and move things yourself. Here is little snippet to give you the idea.
private void gridGroupingControl1_TableControlMoveCurrentCellDirection(object sender, GridTableControlMoveCurrentCellDirectionEventArgs e)
{
	GridTableCellStyleInfo style = e.TableControl.Model[e.Inner.RowIndex, e.Inner.ColIndex];
	int lastCol = style.TableCellIdentity.Table.TableDescriptor.VisibleColumns.Count - 1;
	if(style.TableCellIdentity.Column.MappingName == style.TableCellIdentity.Table.TableDescriptor.VisibleColumns[lastCol].Name)
	{
		if( e.Inner.Direction == GridDirectionType.Right)
		{
			GridCurrentCell cc = e.TableControl.CurrentCell;
			cc.MoveDown(1);
			cc.MoveTo(cc.RowIndex, cc.ColIndex - lastCol);
			e.Inner.Handled = true;
			e.Inner.Result = true;
			
		}
	}
}
2) You can prevent a cell fdrom becoming the currentcell by setting style.Enabled=false for that cell. So, if you do not want a column enabled, you could do something like: this.gridGroupingControl1.TableDescriptor.Columns["ParentName"].Appearance.AnyCell.Enabled = false; 3) You set the BackColor of a column by setting the style.BackColor property for that column. this.gridGroupingControl1.TableDescriptor.Columns["ParentName"].Appearance.AnyCell.BackColor = Color.Red; 4) You set the style.Trimming property for that column. this.gridGroupingControl1.TableDescriptor.Columns["ParentName"].Appearance.AnyCell.Trimming = StringTrimming.EllipsisWord; 5) If you want to change a whole series of values in a DataTable and not have each change individually propagated to the grid, before modifying the datatable values, set this.gridGroupingControl1.Table.TableDirty = true; and then do not access any this.gridGroupingControl1 properties until you have completed your update. 1) You use either grid.GridBoundColumns["Col1"}.StyleInfo.Enabled or grid.Binder.InternalColumns["Col1"].StyleInfo.Enabled depending upon whether you have added GridBoundColumns or not. 2) Same as 1 except you set StyleInfo.BackColor.

Prof DISSOU Jamâl-Dine
Replied On May 19, 2005 03:35 PM UTC

Hi Clay, Thanks a lot. Best regards, Jamâl-Dine DISSOU

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

;