I have a formview that I want to disable some of the automatically generated buttons on under certain conditions (i.e. certain users can't delete). For a detailsview, I can simply use:

dvInstance.AutoGenerateDeleteButton = false;

However the same option does not exist for a formview. How can I disable the automatically generated buttons for a formview?

有帮助吗?

解决方案

That's because it is a different web control. To achieve what you want you will need to specify the form's templates (ItemTemplate, EditItemTemplate and FooterTemplate) and then provide your own command buttons if required.

Hope it helps

Leo

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top