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
220
How to change value or button caption in "ClickCellButton"?
posted

How to change value or button caption in "ClickCellButton"?

I am doing following and it doesn't work?

Private Sub ultraGridBasicCreationFilter_ClickCellButton(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles ultraGridBasicCreationFilter.ClickCellButton

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

With e.Row.Cells("Action")

.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button

.Column.ButtonDisplayStyle = UltraWinGrid.ButtonDisplayStyle.Always

.Column.CellClickAction = CellClickAction.CellSelect

.Value = "Accept Quote"

End With

End Sub

 

  • 469350
    Verified Answer
    Offline posted

    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.