Richard Hooper
Richard Hooper

Reputation: 819

Add my UserControl to DevExpress ASPxGridView column header

I have an ASPxGridView on my page which has a few columns of data. Basically what I want to do is to add a tooltip (which I have as a user control) to each of the column headers. I don't think that it is possible to do this in the markup as I don't want to loose any of the functionality already in the grid headers (e.g. filter, etc) so what I need to do is loop through the header cells somehow to add the control in dynamically.

I have tried using the OnHtmlRowPrepared event but this does not fire for headers!

I want to achieve something like the following so the tooltip will show on hover (the tooltip is already implemented).

enter image description here

Any ideas?

Upvotes: 0

Views: 2527

Answers (1)

Filip
Filip

Reputation: 3347

You can use the GridViewColumn.HeaderCaptionTemplate property to implement this.

Here are two samples on using this property:

  1. Using header caption template in aspx
  2. Using header caption template in code behind

Upvotes: 1

Related Questions