Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9050681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T12:42:56+00:00 2026-06-16T12:42:56+00:00

I am using DevExpress gridview that have a command button inside. I want to

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T12:42:58+00:00Added an answer on June 16, 2026 at 12:42 pm

    You can add CommandColumn simply as below, but you should take care about the asp.net page events to work it correct.

    protected void Page_Init(object sender, EventArgs e)
    {
        GridViewCommandColumn column = new GridViewCommandColumn("....");
        column.DeleteButton.Visible = true;
        column.DeleteButton.Image.Url = "set path here";
        column.Visible = true;
        column.VisibleIndex = 2;//place where you want it to display
        ASPxGridView1.Columns.Add(column); 
    }
    protected void Page_Load(object sender, EventArgs e)
    {
       // Bind Data here
        BindData();
    }
    

    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..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using DevExpress's GridView. I have edit button working fine. I need to
I am using Entity Framework and DevExpress 10.5 XtraGrid. Imagine that we have entities
I have a page using ASPxGridView and to fill the GridView I use a
I am using DevExpress in my winform application, I have a gridview, data entry
i am using devexpress gridview 9.2. i have 2 gridview having 2 colum -->
I am using DevExpress Image and there is a property IsPng that will indicate
I am using devexpress 9.1. I have devexpress gridview binded to datasource. have set
I am using DevExpress GridView here, but I am guessing that the issue is
We are using DevExpress XtraReports 2009v3.3 and although I can achieve what I want
is it possible using devexpress TreeList as inplace editor in gridView column ? i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.