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
1775
ultrwingrid cell activation
posted

Hi guys

I need to provide the following functionality using the grid. A specific column cell activation will always be disabled except when creating new and only the newly created row for this specific column must always remain editable while all other rows for this column must remain disabled.

Parents
No Data
Reply
  • 34830
    Offline posted

    Hello Elsworth,

    I have been investigating this requirement that you are looking to achieve, and it sounds like you are looking for certain cells in your UltraGrid to be read only, but for that same column, have the add-new row be editable. If this is not the case, please let me know as the following is based on that impression.

    In order to achieve this, I would recommend utilizing the BeforeRowUpdate event on the UltraGrid. This will fire for the add new row when it commits, and the event arguments can net you the row element using the Row property. You can then check for IsAddRow being true for this row to see if this event firing is coming from the add-new row.

    If it does come from the add-new row, you can index into the Cells collection of that row, which has an Activation property. If you set this to Activation.NoEdit for certain cells, you can prevent edit mode on the newly committed row for certain cells.

    I am attaching a sample project to demonstrate the above. I hope this helps you.

    Please let me know if you have any other questions or concerns on this matter.

    UltraGridCellActivationCase.zip

Children