I would like to bind a list of objects to gridview. The object needs to contain a column of buttons. Some of these buttons need to be disabled depending on the data in the list.
Is it possible to generate a list of objects including the enabled or disabled buttons and simply bind to the gridview?
you can add button in
gridviewitemtemplatelike this :then you can add
Flagasboolvariable in your datasource and set your desired values ,trueto enable ,falseto disableEdit , for example you have datasource like this :
if
IsButtonEnabledis true so button will be enabled else it will be disabled