Datagrid and header with image

  • Thread starter Thread starter sunil
  • Start date Start date
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
 
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.
 
Back
Top