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.
Syncfusion Feedback

Tabbinb to next chidl row

Thread ID:

Created:

Updated:

Platform:

Replies:

77421 Oct 30,2008 06:11 PM UTC Nov 5,2008 09:53 AM UTC Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On October 30, 2008 06:11 PM UTC

Using a GridGroupingControl, when I'm on the last cell on a row and I hit TAB key, I want the focus to go into its child rows on the first column (expand the row and focus the first cell inside).

The WrapCellBehavior does not do anything.
I'm looking at OnTableControlCurrentCellKeyDown to redirect the focus to the proper row/col, but I can't find how to do it.
I need help on this.

Thanks


Rajadurai C [Syncfusion]
Replied On November 5, 2008 09:53 AM UTC

Hi Patrick,

Thanks for your interest in Syncfusion products.

Apologies for the delay.

This feature can be achieved by means of TableControlMoveCurrentCellDirection event handler in GridGroupingControl.

Here is the codesnippet,


private void gridGroupingControl1_TableControlMoveCurrentCellDirection(object sender,GridTableControlMoveCurrentCellDirectionEventArgs e)
{
GridTableCellStyleInfo style = e.TableControl.Model[e.Inner.RowIndex, e.Inner.ColIndex];
int lastPos = style.TableCellIdentity.Table.TableDescriptor.VisibleColumns.Count - 1;
string lastName = style.TableCellIdentity.Table.TableDescriptor.VisibleColumns[lastPos].Name;
if(style.TableCellIdentity.Column.MappingName == lastName && e.Inner.Direction == GridDirectionType.Right)
{
Element el = style.TableCellIdentity.DisplayElement;
if(el != null)
{
GridRecord rec = el.ParentRecord as GridRecord;
int index = style.TableCellIdentity.Table.FilteredRecords.IndexOf(rec);
if(index < style.TableCellIdentity.Table.FilteredRecords.Count - 1)
{
rec = style.TableCellIdentity.Table.FilteredRecords[index + 1] as GridRecord;
rec.SetCurrent(style.TableCellIdentity.Table.TableDescriptor.VisibleColumns[0].Name);
e.Inner.Handled = true;
e.Inner.Result = true;
}
}
}
}


Please refer the following sample.
http://websamples.syncfusion.com//samples/Grid.Windows/F77421/main.htm

Please let me know if this helps.

Regards,
Rajadurai







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

;