joe joe - 3 months ago 24
Vb.net Question

Unable to change Checked state of an CheckBox style UltraGridCell

Using the

Infragistics
suite, I've taken over a project where there is a column that is
Checkbox
style, which represents a
Boolean
value in the database. I'm having trouble following the code that handles changing the value of it, as I've never come across anything like this before.

I only seem to be able to change the value of this column if I change the date in the 'Final Delivery' column first. However, the final delivery date has already been assigned a value before this stage in the process that I'm going through, so it can't be changed again.

Why does the following code not let me change the checked value unless I change the "Final_Delivery" value first?

If e.Cell.Column.ToString = "Final_Delivery" Then
e.Cell.Row.Update()
End If

If Replace(e.Cell.Column.ToString, "[hidden]", "").Trim = "Customer_Paid" Then
e.Cell.Row.Update()

If e.Cell.Value = True Then
e.Cell.Row.Cells("PaymentDate").Value = Today
End If

End If

Answer

Have you tried something like this where you set the layout/settings for the grid?

YourUltraGrid.DisplayLayout.Bands(0).Override.CellClickAction = CellClickAction.Edit