Ticket T137127
Visible to All Users

How to change a row style based on a column value

created 11 years ago

[DevExpress Support Team: CLONED FROM A264: How to change a row style based on a column value]
how do i fire gridView1_RowCellStyle event (i mean on my aspx page)

Answers approved by DevExpress Support

created 11 years ago

Hello,
Use the ASPxGridView.HtmlDataCellPrepared event to implement the required task. Please refer to the Change row and data cell styles using events example for details. Should you have any further questions, feel free to contact us.

    Comments (2)

      Hi,
      What if i need to do the same on grid_CustomButtonCallback event??
      which means i need to highlight the row which is selected through the above event.

      Anthony (DevExpress Support) 11 years ago

        Hi Parinita,

        This event is raised on each callback to the server, including a custom button's callback. However, I'm not sure that I understand the task you are trying to accomplish. If you only select a row, it is possible to simply customize the layout of selected rows using the Styles.SelectedRow property.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.