Home Forums WinForms controls Xceed Grid for WinForms Feature similar to Winforms datagrid of HITTest.nowhere

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17601 |

    Hi,

    I have a grid, where there is a possibility of empty grid , after some ten to 15 rows.how can i determine the click on the empty grid.

    basically waht i want to say is , in .Net winforms we have a Property of  HITTest.nowhere on winforms datagrid, pls let me know how to acheive this functionality with xceed .Net for winforms  grid.

    Imported from legacy forums. Posted by saumya (had 1487 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Saumya, 

    If I understood you correctly, you need to detect when the users clicks on an empty region of the grid? even if the grid is not empty?

     

    If that is the case, you can simply subscribe to the “Click” even of the grid. that event would not be raised when the users clicks on a row or a header and it would only be raised when clicking on an empty space in the grid.

    For example, if you open the samples of the grid live explorer , open the DynamicEditorDisplay sample, add the click event at the end of the DynamicEditorDisplay_Load event

     

      gridControl1.Click += new EventHandler(gridControl1_Click);

     

      void gridControl1_Click(object sender, EventArgs e)

        {

            MessageBox.Show(e.ToString());

        }

    and you would see that the message box would only show when clicking on an empty region on the grid.

    I hope this is what you are looking for!  

        

    Imported from legacy forums. Posted by Michel [Xceed] (had 156 views)

    User (Old forums)
    Member
    Post count: 23064

    Oh wow… thats gr8. It works… [:)]

    thanks a lot

    Imported from legacy forums. Posted by saumya (had 1393 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.