what is meaning of this code:
GridView1.Attributes.Remove("DeleteRecord");
or
GridView1.Attributes.Remove("onrowcommand");
or
GridView1.Attributes.Remove("UpdateRecord");
In other words, I want to disable insert, edit and delete method of a gridview in runtime and come to this code but it does not react.
do you have any other offer?
the attributes property is for setting additional properties not methods. you are using it very incorrectly.
if you don’t want the rowcommand to execute, remove the rowcommand=”xxxx” from the aspx.
if you mean to keep the rowcommand, then in your rowcommand method (xxxx) in my example, write some c# code to intercept and not execute further in that method.