hi,

I am trying to create a web custom control- a grid view that inherits from the system.web.ui.webcontrols.gridview class,,

the functionality that i am trying to add to this custom control is-sorting with up and down arrow keys on the header,

i found a control on the net that does sorting as i want,,,

but u see the problem is that the custom control does sorting with images only when bound through an sqldatasource either directly by placing a datasource control on my aspx page or by programmatically creating one in the page load

when i try binding the custom control using a dataset , i am unable to sort with the images-up and down arrow keys,,

i have created handlers for sort event so sorting occurs through the header links but the iamges don't show


i would really appreciate any help from ur side

painthu

You can programmatically set a gridview column's headertext (which can be html). So in your procedure that handles the sorting, you could do the following and change the image source depending on the sort direction.

gv.Columns(0).HeaderText = "<img src='whatever.jpg' />"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.