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
325
Preventing tab and mouse click in UltraGrid
posted

I am subclassing the UltraGrid to create a read only Grid in my WInForms. I want to prevent tab and mouse clicks inside individual cells. I was able to prevent tab navigation by using the following inside my class

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            switch (keyData)
            {
                case Keys.Tab:
                    {
                        this.TopLevelControl.SelectNextControl(this, true, true, true, true);
                        return true;
                    }
           }
           return base.ProcessCmdKey(ref msg, keyData);
  }

 

I also want to prevent the user from clicking on a cell and effectively cancelling the event. can someone

show me some possible solutions?