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,
This KB article should help you achieve what you want with the arrow keys:
HOWTO:UltraWinGrid Cursor Movement like Excel
Hi Mike,
Thanks for your useful information. Currently my project is written in C#, so I guess it will be very helpful that if you can provide me any sample available in C#.
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.
if set the column ValueList, the data changes in the cell after passing through it.