I am using DevExpress gridview that have a command button inside. I want to use image instead of it. How can be it possible?
Upto now I have tried this much :
GridViewCommandColumn commancol = new GridViewCommandColumn();
commancol.ButtonType = ButtonType.Image;
GridViewCommandColumnButton moveUpBtn;
moveUpBtn.Image.Url = "~/App_Themes/Images/GridControl/grid-delete.png";
commancol.Add(moveUpBtn);
But it is giving error.
I want to add a below way button from .cs page instead of aspx page. so i tried to above way from codebehind.
<dx:GridViewCommandColumn ButtonType="Image">
<HeaderTemplate>
</HeaderTemplate>
<DeleteButton Visible="true" Text="" Image-Url="grid-delete.png"
Image-ToolTip="Delete Record">
</DeleteButton>
</dx:GridViewCommandColumn>
Thanks
You can add CommandColumn simply as below, but you should take care about the asp.net page events to work it correct.
Refer the documentation of Command Columns, then you can get another command button also and set their properties at run time as you want.
Hope this help..