Datagrid and header with image

S

sunil

Iam trying to implement sorting.
I know how to display a button in the header of an datagrid. How can i
display an image with down arrow and uparrow along the side of button on the
header.
Any sample pointers will be of great help.

Thanks
 
A

Alvin Bruney

You will need to create a label control in th itemcreatedevent eventhandler,
set the font to webdings and the text to 5 for down 6 for up then add the
label to the header cell
if(listitemtype == header)
Label arrow = new Label
Label.Font = webdings
Label.Text = 5
e.item.cells[1].controls.add(label)
you will also need to store the sort direction or get the control, check the
text and flip it depending on what it is.

this is pseudo code by the way.
 

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

Forum statistics

Threads
474,079
Messages
2,570,574
Members
47,207
Latest member
HelenaCani

Latest Threads

Top