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
1445
How to make cell NoEdit or AllowEdit?
posted

I have a grid with a dropdown in one of the cells. Depending what is selected with in the drop down, some of my cells will become enabled or disabled. I get the Activation.NoEdit/AllowEdit, because I have done this on other forms. However, it does not want to work for me here. Could that be done in only certain events? When I used it in the past it was on Initialize Row? Now I am trying to handle it in Cell Change. I also tried to refresh the row and I can still edit in that cell.

 

Any thoughts?

 

  • 469350
    Offline posted

    Hi,

    Are you trying to change the Activation on a cell while the focus is still in that cell? Or are you trying to change the activation of some other cell?

    If it's some other cell in the same row, then the CellChange event should work just fine?

    If you are trying to change the Activation of the same cell, then I'm not sure you can do this in CellChange. You are basically trying to disable the cell while the user is in the process of editing it, so I would not be surprised if that did not work. It doesn't really make a lot of sense to do that, because if the user chooses the wrong item accidentally or uses the keyboard to scroll through the list of values, they could accidentally disable the cell with no way to re-enable it.

    In that case, you might want to consider using AfterCellUpdate, which doesn't fire until the user leaves the cell.