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.
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.
My question is very similiar:
On my binding I need to enable/disable button on a row based on a checkbox's value on the same row. I don't fully understand what you've said, but I was hoping kind of an on row binding event where I could test this. Right now it happens on the valuechanged event and works correctly. However, on binding it's like that value changed is not called and so I think I have to find a way to do it per row... I guess I could do it on grid_load event and loop through each datarecord but that doesn't seem very eligant.