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
510
UltraTree checkbox column & spacebar key
posted

Hi,

I have a node with a check-box column. When the column has focus (activated) I want the user to use the spacebar key to toggle the state of the chekbox.

This is how I setup the column:

_checkEditor = new UltraCheckEditor();
 _checkEditor.CheckAlign = ContentAlignment.MiddleLeft;
 
_fixBatchColumnSet = new UltraTreeColumnSet();
_fixBatchColumnSet.Columns.Add("Active");
        
_fixBatchColumnSet.Columns["Active"].EditorComponent = _checkEditor;
_fixBatchColumnSet.Columns["Active"].HeaderAppearance.TextHAlign = HAlign.Left;
_fixBatchColumnSet.Columns["Active"].AllowCellEdit = AllowCellEdit.Full;

Is this possible?

Thanks

  • 6120
    Offline posted

    Hi Joseph, 

    To achieve this you have to write custom code in your KeyUp event that checks if the active key is a SpaceBar key and if it is then toggle the check-box column value.

    Is there a specific reason why you are using UltraTree control because you can use our UltraGrid Control which does this automatically for you?

    Please let me know if you have any questions. 

    Sincerely,

    Sahaja Kokkalagadda

    Associate Software Developer, Windows Forms

    http://es.infragistics.com/