Click here to Skip to main content
13,254,077 members (61,957 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 2 Nov 2012

DevExpress ASPxGridView Custome Edit- Icon on Header

, 2 Nov 2012
Rate this:
Please Sign up or sign in to vote.

Editorial Note

This article appears in the Third Party Products and Tools section. Articles in this section are for the members only and must not be used to promote or advertise products in any way, shape or form. Please report any spam or advertising.


Dev Express provides a sophesticated third party gridview control. Below example provides detail information and code snippet on how to customize dev express header field to achieve bulkupdate


Recently I got an opportunity to enhance application which uses DevExpress controls. DevExpress Gridview control provides several features and functionalities which are not available standard controls provided by aspx. I was trying to add an icon for bulk update in header field of DevExpress Gridview control. I couldn't find exact sample for what i want to achieve. So i thought this sample will be of great help for those who want to do bulk update.


1) To have a pencil icon on the column header for the field i want to bulk update 2) On Clicking the pencil icon should open the popup which has list to choose 3) After selection the grid need to be updated with the selected value.

To achieve this: 

1) To have a pencil icon on the column header for the field i want to bulk update Add Header caption template
<dx:ASPxLabel ID="ASPxLabel9" runat="server" Text="xActionType" > 
<dx:ASPxImage ID="ASPxImage1"  runat="server" ImageUrl="~/images/pencil2.png">
<ClientSideEvents Click="function(s,e){HeaderActivityPopupControl.Show();}" />
2) On Clicking pencil open popup control , Find below is the code snippet for popup
<dx:ASPxPopupControl ID="HeaderActivityPopupControl" runat="server" AllowDragging="True"

            ClientInstanceName="HeaderActivityPopupControl" HeaderText="ActionType"

            Modal="True" EnableClientSideAPI="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter">
                    <table width="60px">
                            <td align="left">
                                <dx:ASPxLabel ID="ASPxLabel15" runat="server">
                            <td align="center">
                                <dx:ASPxListBox ID="ASPxListBox1" runat="server">
                                    <dx:ListEditItem Selected="True" Text="Add" Value="Add" />
                                    <dx:ListEditItem Text="Update" Value="Update" /> 
                            <td align="center">
                                <dx:ASPxButton ID="ASPxButton3" runat="server" Text="Save" AutoPostBack="false" 

                                    <ClientSideEvents Click="function(s, e) { HeaderActivityPopupControl.Hide(); }" />
3) Add server side code for your save event
protected void ASPxButton3_Click(object sender, EventArgs e)
            List<ECNLineItems> selectedItems = new List<ECNLineItems>();
            for (int i = 0; i < gridLineItems.VisibleRowCount; i++)
                // Add your edit logic here


version 1.0


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Member 2361152
Web Developer
United States United States
This member doesn't quite have enough reputation to be able to display their biography and homepage.

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.171114.1 | Last Updated 2 Nov 2012
Article Copyright 2012 by Member 2361152
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid