Skip to content

Infragistics Community Forum / Desktop / Ultimate UI for Windows Forms / Trying to select an entire row when a cell is clicked

Trying to select an entire row when a cell is clicked

New Discussion
Graham
Graham asked on Oct 1, 2008 9:27 PM

I’m using this code to select the entire row when a cell is activated by clicking or keyboard
Private Sub ugMain_AfterRowActivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles ugMain.AfterRowActivate
   ugMain.ActiveRow.Selected = True
   Application.DoEvents() ‘ I see the row select
End Sub

This does select the entire row, but another mechanism I am not aware of selects only the cell  Any idea what I am doing wrong?? 

 

Sign In to post a reply

Replies

  • 0
    [Infragistics] Vince McDonald
    [Infragistics] Vince McDonald answered on Oct 1, 2008 9:18 PM

    With the setup you've provided, the row will be selected as soon as it's activated.  If you click on another cell in the same row, this event won't get raised again – the behavior that occurs then depends on how you've set your grid up.

    If you don't ever need to edit the values in any cell, or to select only individual cells, then you can set the grid's DisplayLayout.Override.CellClickAction to "RowSelect".

    I suggest shying away from calling Application.DoEvents().  It doesn't seem as problematic in CLR 2.0 and CLR 3.5 as it used to be in CLR 1.1, but if you aren't using it for a specific reason, I suggest avoiding it.

    • 0
      Graham
      Graham answered on Oct 1, 2008 9:27 PM

      ugMain.DisplayLayout.Override.CellClickAction =Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect

      Perfect… Thanks…

       

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Graham
Favorites
0
Replies
2
Created On
Oct 01, 2008
Last Post
17 years, 5 months ago

Suggested Discussions

Tags

Created by

Created on

Oct 1, 2008 9:27 PM

Last activity on

Feb 24, 2026 9:48 PM