Losing sortability when changing header text

J

Jacques Leclerc

I've got a datagrid on a webform. The sortable attribute is set within the
<asp:DataGrid> tag on the aspx file. An intial value is also set for the
column header text.

In the code behind page in the ItemDataBound event I reset the header text
based on a user selection criteria. The setting of the header text is
accomplished with the following code.
e.Item.Cells(0).Text = "<p>Donation Group</p>"

The column displays the new header text but the sortability for that column
is lost.

Does anyone know the correct syntax for changing the header text without
losing the sortability?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top