I wrote a similar post on here last October, and having used the information I was given in that thread to solve the same issue, I've been unable to solve the issue this time around.
I have an orders program, where there is a column for entering a payment date, and a checkbox column to mark the order as 'Customer Paid' allowing it to progress to the next stage.
When opening the order to enter the payment date, I'm able to edit both the payment date cell, and the checkbox cell in all of the order lines. If I mark one order line as paid for and leave one unpaid, and save then re-open the order, I am then only able to edit the payment date cell, and not the checkbox cell.
What is going wrong? Why does saving the data disable it from entering Edit Mode?
This is my code;
Try If e.Cell.Column.Key = "PaymentDate" Then e.Cell.Row.Cells("Customer_Paid").Activation = Activation.AllowEdit End If Catch ex As Exception errorLog(ex) End Try
Try If e.Cell.Column.ToString = "Customer_Paid" Then Dim customerPaid As Boolean = Boolean.Parse(e.Cell.Text)
If customerPaid = True Then If IsDBNull(ugProducts.ActiveRow.Cells("PaymentDate").Value) Then MsgBox("Please enter a payment date", MsgBoxStyle.OkOnly, "Invalid Date") e.Cell.Row.Cells("Customer_Paid").Value = False ugProducts.ActiveRow.Appearance.BackColor = Color.White ugProducts.ActiveRow.Cells("PaymentDate").Value = DBNull.Value Else ugProducts.ActiveRow.Appearance.BackColor = Color.LightGreen ugProducts.ActiveRow.Cells("Product_Price_Per").Appearance.BackColor = Color.LightGreen End If
Else ugProducts.ActiveRow.Appearance.BackColor = Color.White ugProducts.ActiveRow.Cells("Product_Price_Per").Appearance.BackColor = Color.LightGreen ugProducts.ActiveRow.Cells("PaymentDate").Value = DBNull.Value Exit Sub End If
Catch ex As Exception errorLog(ex)
The similar post: http://www.infragistics.com/community/forums/p/107872/508296.aspx#508296
hi David, I didn't get it clearly how or where are you saving the order and how are you re-opening the order. So I need a sample where the issue can be reproduced to investigate more on this case.
Not to worry, I changed the functionality, so that now changing the date will set the value to true.