Hi all,
I have a new task that need to display out a report in grid with few column of data, then allow user direct fill in the data like using excel. the grid should be able to move to next cell by clicking the arrow keys in keyboard, and user can direct key-in the value. May I know is it any function of infragistic able to customize like this?
Please guide.
Thank you very much!
Hi Boris!
Thanks for the quick response! And I am sorry for my rather insufficient post... The code you sent me IS EXACTLY what I have in my screen as well. I am perhaps having some other property set which is not making it work. I have used this code previously and been successful with it... When I debug, it goes through the keydown event and for the down arrow is does go through performaction - belowcell - but the cursor does not move down, it moves right.... If you can think of any property that may be causing me this issue, do let me know... Meanwhile, if I find anything, will surely post it here as well.
Many thanksChitra
Hello Chitra,
Could you please review the sample attached to this post and see if it meets your requirements.Please feel free to let me know if I misunderstood you or if you have any other questions.
Hello!!!!
I have this exact piece of code for just my up and down arrows.... but the focus moves to left or right!! I tried what somebody else said - do scroll below -- but if you have filters on, then there are issues with this piece of code...Kinda started working on fixing it. What am I missing which is not making the cursor move up and down but left and right? Using Infragistics v.12.1...
THANKSChitra
ultraGridForecast.PerformAction(UltraGridAction.ExitEditMode, false, false);
//ultraGridForecast.PerformAction(UltraGridAction.BelowCell, false, false);
//the above line of code should work!! but it is making the cursor move to the left and right!!! SO!!
int activeCell = ultraGridForecast.ActiveCell.Column.Index;
int activeRow = ultraGridForecast.ActiveRow.Index;
if (activeRow != ultraGridForecast.Rows.FilteredInRowCount - 1)
{ultraGridForecast.ActiveRow = ultraGridForecast.Rows[activeRow + 1];ultraGridForecast.ActiveCell = ultraGridForecast.ActiveRow.Cells[activeCell];
}
e.Handled = true;
ultraGridForecast.PerformAction(UltraGridAction.EnterEditMode, false, false);
Hi Torrey,
Is working well now. Thanks alot !~~
you always help me alot ^^
Here's the important part of that HOWTO converted over to C#.
private void ultraGrid1_KeyDown(object sender, KeyEventArgs e) { switch (e.KeyCode) { case Keys.Up: ultraGrid1.PerformAction(UltraGridAction.ExitEditMode, false, false); ultraGrid1.PerformAction(UltraGridAction.AboveCell, false, false); e.Handled = true; ultraGrid1.PerformAction(UltraGridAction.EnterEditMode, false, false); break; case Keys.Down: ultraGrid1.PerformAction(UltraGridAction.ExitEditMode, false, false); ultraGrid1.PerformAction(UltraGridAction.BelowCell, false, false); e.Handled = true; ultraGrid1.PerformAction(UltraGridAction.EnterEditMode, false, false); break; case Keys.Right: ultraGrid1.PerformAction(UltraGridAction.ExitEditMode, false, false); ultraGrid1.PerformAction(UltraGridAction.NextCellByTab, false, false); e.Handled = true; ultraGrid1.PerformAction(UltraGridAction.EnterEditMode, false, false); break; case Keys.Left: ultraGrid1.PerformAction(UltraGridAction.ExitEditMode, false, false); ultraGrid1.PerformAction(UltraGridAction.PrevCellByTab, false, false); e.Handled = true; ultraGrid1.PerformAction(UltraGridAction.EnterEditMode, false, false); break; } }
The above code shows you how to handle the KeyDown event of the UltraGrid to get that Excel style arrow key navigation.