I'd like to be able to use Keys.Escape to close the currently expanded UltraWinGrid element when using this as a tree, but don't know how to begin. I have captured the KeyDown event ok, but what next? Manually, we do this by clicking on the ExpansionIndicatorUIElement to close the tree. The number of rows is large, so scrolling back up to close the tree each time is tedious.
Hi Mark,
The Escape key already has some functionality in the grid by default. It will cancel the current cell edit, and then cancel all edits for the current row. So using Escape will be a bit complicated if you are allowing the user to edit the grid.
If not, then this should be very simple.
private void ultraGrid1_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Escape) { UltraGridRow row = this.ultraGrid1.ActiveRow; while (null != row) { row.Expanded = false; row = row.ParentRow; } } }
Hello,
I am just checking about the progress of this issue. Let me know If you need our further assistance on this issue?
Thank you for using Infragistics Components.