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
395
Selecting specific cells in active row of grid
posted

Hello there,

Here is something that I am trying to do. In the grid, I have some cells where activation is set to allowEdit and some cells where it is set to NoEdit. What I am trying to do is, enter in the edit mode whenever it is AllowEdit type cell. When it is NoEdit type cell, move to next cell without showing focus on it or without activating it.

Here is code,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Private Sub ugProperties_AfterRowActivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles ugProperties.AfterRowActivate

 

 

 

 

 

 

For Each cell In ugProperties.ActiveRow.Cells

 

 

If cell.Activation = Activation.AllowEdit And cell.IsActiveCell = False Then

 

 

cell.Activate()

ugProperties.PerformAction(UltraGridAction.EnterEditMode)

 

 

Exit Sub

 

 

'Else

 

 

' I am not sure about this portion and looking for help

 

 

End If

 

 

Next

 

This fired CellActivate Event when I call cell.activate. Here is event handler for that.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Private Sub ugProperties_AfterCellActivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles ugProperties.AfterCellActivate

 

 

 

 

 

 

 

 

If ugProperties.ActiveCell.Activation = Activation.AllowEdit Then

 

 

 

 

RemoveHandler ugProperties.AfterCellActivate, AddressOf ugProperties_AfterCellActivate

 

 

RemoveHandler ugProperties.AfterRowActivate, AddressOf ugProperties_AfterRowActivate

ugProperties.ActiveCell.Activate()

ugProperties.PerformAction(UltraGridAction.EnterEditMode)

 

 

AddHandler ugProperties.AfterRowActivate, AddressOf ugProperties_AfterRowActivate

 

 

AddHandler ugProperties.AfterCellActivate, AddressOf ugProperties_AfterCellActivate

 

 

Exit Sub

 

 

 

 

End If

 

Waht I think is, in the whenver the cell activation is NoEdit, I dont even want to see that little focus rectangle on the cell neither I want to activate the cell.  I want to jump into first editable cell in the row.

Any help is greatly appreciated.

Thank you very much

 

Parents
  • 48586
    posted

    Hello, ­­­­­

     

    I am just checking about the progress of this issue. Let me know If you need any further assistance on this  issue?

     

     

    Thank you for using Infragistics Components.

Reply Children
No Data