Home Forums WinForms controls Xceed Grid for WinForms cell button Reply To: cell button

User (Old forums)
Member
Post count: 23064

Yes, that right. I have it set up so when a user clicks on a cell the button appears next to the cell text.
Now, when a user clicks on another cell I want to set the previous button to invisible.

Private Sub xg_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles xg.CurrentCellChanged

If xg.Columns.IndexOf(xg.CurrentColumn) = i Then
addbutton(xg.CurrentCell)
End If

End Sub

Private Sub addbutton(ByVal cell As Cell)
Dim wtb As New WinTextBox(EnhancedBorderStyle.None)
Dim but As New Button()

but.Visible = True
but.Text = “…”
but.Width = 20
but.BackColor = Color.LightGray

wtb.Controls.Add(but)

cell.CellEditorManager = New TextEditor(wtb)
AddHandler cell.CellEditorManager.ActivatingControl, AddressOf CellEditorManager_ActivatingControl

cell.CellViewerManager = New TextViewer(wtb)

End Sub

Imported from legacy forums. Posted by troy@querytool.com (had 422 views)