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
640
How to enable or disable a button per row based on the index of the row
posted

How would you enable or disable a button in a GridRow based on the row index.  I have a number of grids that have a minimum requirement, but the user would be able to delete rows if they are non required records.

Parents
  • 2426
    posted

    Hello bberstrom,

    You can create a style for the CellValuePresenter and in set the Template property to contain a button. Then you can bind the button's IsEnabled property to the TemplatedParent's (CellValuePresenter) Record.Index. You will have to use a Converter to convert the appropriate int's to the appropriate booleans.

    Hope that helps.

Reply Children