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

Arrow key navigation problem

Thread ID:

Created:

Updated:

Platform:

Replies:

48926 Sep 6,2006 01:59 PM UTC Sep 12,2006 12:45 PM UTC Windows Forms 7
loading
Tags: Grouping
jamesb
Asked On September 6, 2006 01:59 PM UTC

I have a ggc with editable captionrow. I can only go up or down the column (even across captionrow) when trying to navigate. When I trying to use the right and left arrow key nothing happens.

Please help!

Administrator [Syncfusion]
Replied On September 7, 2006 04:59 AM UTC

Hi James,

Try the below code in TableControlCurrentCellKeyDown event.

GridCurrentCell cc = e.TableControl.CurrentCell;
GridTableCellStyleInfo style = cc.Renderer.CurrentStyle as GridTableCellStyleInfo;
if( style != null)
{
if ( style.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionSummaryCell)
{
e.TableControl.ForceCurrentCellMoveTo = true;

switch(e.Inner.KeyData)
{
case Keys.Right:
cc.MoveTo(cc.RowIndex,cc.ColIndex+1,GridSetCurrentCellOptions.SetFocus);
e.Inner.Handled = true;
break;
case Keys.Left:
cc.MoveTo(cc.RowIndex,cc.ColIndex-1,GridSetCurrentCellOptions.SetFocus);
e.Inner.Handled = true;
break;
}
}
}

Let me know if this helps.
Best Regards,
Haneef

jamesb
Replied On September 7, 2006 04:55 PM UTC

That didn''t work! Still can''t navigate with the arrow key LEFT or RIGHT.

Administrator [Syncfusion]
Replied On September 8, 2006 06:16 AM UTC

Hi James,

I tried to reproduce the problem in this sample, but could not using version 4.2. What version of our libraries are you using?

http://www.syncfusion.com/Support/user/uploads/LastrecUpdateSummaryNavigate_9b080d29.zip

Are you doing anything different than what the sample does?

Thanks,
Haneef

jamesb
Replied On September 8, 2006 07:51 PM UTC

Besides handling the following events, I am not doing anything different. Left/Right arrow key navigation should be automatic, like the Up/Down arrow key, I think.

this.gridGroupingControl.CurrentRecordContextChange += new Syncfusion.Grouping.CurrentRecordContextChangeEventHandler(gridGroupingControl_CurrentRecordContextChange);
this.gridGroupingControl.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(gridGroupingControl_QueryCellStyleInfo);
this.gridGroupingControl.QueryCoveredRange += new GridTableQueryCoveredRangeEventHandler(gridGroupingControl_QueryCoveredRange);
this.gridGroupingControl.TableControlCurrentCellValidating +=new GridTableControlCancelEventHandler(gridGroupingControl_TableControlCurrentCellValidating);
this.gridGroupingControl.TableControlCurrentCellEditingComplete += new GridTableControlEventHandler(gridGroupingControl_TableControlCurrentCellEditingComplete);
this.gridGroupingControl.TableControlCurrentCellKeyDown += new GridTableControlKeyEventHandler(gridGroupingControl_TableControlCurrentCellKeyDown);
this.gridGroupingControl.TableControlCurrentCellAcceptedChanges += new GridTableControlCancelEventHandler(gridGroupingControl_TableControlCurrentCellAcceptedChanges);


BTW, that the difference between handling TableControlCurrentCellAcceptedChanges and TableControlCurrentCellEditingComplete or CurrentRecordContextChange. Is there is list that show the order in which all these events are raised?


Administrator [Syncfusion]
Replied On September 11, 2006 10:57 AM UTC

Hi James,

The TableControlCurrentCellAccpetedChanges is only hit if a change is actually made. It is call after that new value has been saved into a row cache but before the cell has been deactivated.

The TableControlCurrentCellEditingComplete will be hit whether or not a change was made while the cell was in the edit mode. It is called after that when the currentcell has been deactivated. It occurs after CurrentCellRejectedChanges or CurrentCellAcceptedChanges were raised.

The CurrentRecordContextChange occurs before and after the status of the current record is changed. you can check the Action of the CurrentRecordContextChangeEventArgs to get information on which current record state was changed.


Event Order:

....TableControlCurrentCellMoving, CurrentRecordContextChange , TableControlCurrentCellAcceptedChanges,TableControlCurrentCellDeactivating, TableControlCurrentCellEditingComplete, TableControlCurrentCellDeactivated CurrentRecordContextChange,etc......


Let me know if this helps.
Best Regards,
Haneef

jamesb
Replied On September 11, 2006 05:43 PM UTC

How about the LEFT/RIGHT arrow key navigation issue? It''s still not working for me. Any idea

>Hi James,

The TableControlCurrentCellAccpetedChanges is only hit if a change is actually made. It is call after that new value has been saved into a row cache but before the cell has been deactivated.

The TableControlCurrentCellEditingComplete will be hit whether or not a change was made while the cell was in the edit mode. It is called after that when the currentcell has been deactivated. It occurs after CurrentCellRejectedChanges or CurrentCellAcceptedChanges were raised.

The CurrentRecordContextChange occurs before and after the status of the current record is changed. you can check the Action of the CurrentRecordContextChangeEventArgs to get information on which current record state was changed.


Event Order:

....TableControlCurrentCellMoving, CurrentRecordContextChange , TableControlCurrentCellAcceptedChanges,TableControlCurrentCellDeactivating, TableControlCurrentCellEditingComplete, TableControlCurrentCellDeactivated CurrentRecordContextChange,etc......


Let me know if this helps.
Best Regards,
Haneef

Administrator [Syncfusion]
Replied On September 12, 2006 12:45 PM UTC

Hi James,

We haven''t seen the Left/Right Arrow key Navigation problem of "XP SP2 +VS 2003 version + Essential Studio 4.2.". We have tested with the Essentail Studio 4.2 many times , but we haven''''t reproduce the issue in our system. Attached sample working fine here. If you cannot spot why yours is not working, if you can send a sample or code snippet showing what you are doing, maybe I can suggest something.

Here is a sample(implements work-around).
http://www.syncfusion.com/Support/user/uploads/LastrecUpdateSummaryNavigate_9b080d29.zip

Regards,
Haneef

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

;