Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
740
Tabbing does not work in Grid Cells
posted

Hi,

I have  few textfeilds, a grid and few buttons in a form. When my form loads my first focus goes to the first textfield and then when I hit the  "TAB" key, it moves on to the other textfields. Then I have set my tab index to the Groupbox which the Grid resides and then to the Grid. The tabbing goes fine until the Grid first cell (where it goes to the method  ultraGrid1_Enter), then jumps straight away to the buttons in the bottom which has really annoys me!! :(

 

What I want is as soon as the grid is focused, it should navigate through cells which are in editmode using the "TAB" key (usershould be able to make any changes while in that cell)

 

After reading some forums, I have added the ultraGrid1_BeforePerformAction  method, but it WONT go to that method at all!! but when i press the arrow keys from the grid focus position, it moves thorugh the cells (going through that  ultraGrid1_BeforePerformAction ) method, but it wont show the editMode fields.

 

For your information, i have used some editors for some of the colums, which is also in editmode, and i'm thinking whether these giving a bug for that tabbing problem :-?

 

I have set the TabIndexes in the following order:

textboxes -> groupbox -> grid -> grid cells -> buttons

Below shows the methods which i used , which is not helpful at all....

 

 

  

private void ultraGrid1_Enter(object sender, EventArgs e)

{

 

 

UltraGrid grid = (UltraGrid)sender;

 

 

if (grid.Rows.Count > 0)

{

grid.ActiveCell = grid.Rows[0].Cells[1];

grid.PerformAction(UltraGridAction.EnterEditMode);

}

///////////////////////////////

 

private void ultraGrid1_BeforePerformAction(object sender, BeforeUltraGridPerformActionEventArgs e)

{

 

UltraGrid grid = (UltraGrid)sender;

 

if (e.UltraGridAction == UltraGridAction.NextCell)

grid.PerformAction(UltraGridAction.EnterEditMode);

 

}

 

///////////////////////////

 

 

 

 

private void ultraGrid1_KeyDown(object sender, KeyEventArgs

e)

{

 

 

if (e.KeyCode == Keys.Tab)

{

ultraGrid1.PerformAction(UltraGridAction.NextCellByTab);

Please someone help me regarding this matter as it is very urgent!! :(

Sample code is much needed...

Thanks in Advance!!