How to change value or button caption in "ClickCellButton"?
I am doing following and it doesn't work?
If e.Cell.Value = "Accept Quote" Then
e.Cell.Value = "Unselect this item"
ElseIf e.Cell.Value = "Unselect this item" Then
e.Cell.Row.Cells("Action").Value = "Accept Quote"
End If
End Sub
Private Sub ultraGridBasicCreationFilter_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles ultraGridBasicCreationFilter.InitializeRow
.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button
.Column.ButtonDisplayStyle = UltraWinGrid.ButtonDisplayStyle.Always
.Column.CellClickAction = CellClickAction.CellSelect
.Value = "Accept Quote"
End With
The reason this doesn't work is because you are setting the Value inside the ClickCellButton event and then re-setting it in InitializeRow. You should probably be checking the e.ReInitialize flag inside InitializeRow, so that you onlt set the Value of the cell once in that event.