If I have 2/3/4 etc rows in my UltraGrid, I've got an issue. I'm trying to allow edit of 2 columns in the active row when the date column value is changed.
The 2 cells are only editable once the top row in the grid has had a date value entered.
However, I want it to activate for the row that the date was entered on, even if the top row hasn't got a date value.
I've also tried just updating the bottom row, clicking a different control, and seeing if it works then, but it still doesn't.
Am I doing something wrong? I've tried both of the activation lines using the e.Cell.Row.Cells method, and the row.Cells method.
Try If e.Cell.Column.Key = "PaymentDate" Then e.Cell.Row.Cells("Customer_Paid").Activation = Activation.AllowEdit e.Cell.Row.Cells("Customer_Paid").Value = True row.Cells("suppInvoiceNum").Activation = Activation.AllowEdit End If Catch ex As Exception errorLog(ex) End Try
Okay, so, see the below image;
You'll see there are 2 rows in this grid. What I'm trying to do, is enter a payment date onto the second row. When I select a date, the Customer Paid checkbox is supposed to set to 'True', and the Supplier Invoice Number column should become activated, allowing me type into the cell on the bottom row.
The code I have is successfully setting the checkbox to True, but then I cannot set it back to False, and cannot type into the invoice number cell - So neither are having the activation set to AllowEdit.
However, when I enter a date for the top row, it will then allow activation for both columns on both rows. Further testing also shows that when entering a date on the top row, both rows can be activated, even if the bottom has no date, which isn't what I'm aiming for.
When replying, go to the Options tab and then just attach the image as a file.
Hi Mike,
Apologies for the confusion.
I'm trying to attach an image, but it wants a URL? Where can I insert an image to clarify what I mean?
Hi David,
I'm having a very hard time understanding what you are trying to achieve. Even the code snippet you have here isn't really very useful, since I don't know what event this code is in.
Maybe you could post a screen shot or a sample application with more details about exactly what you are trying to do.