•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 361,561 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,035 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 259 | Replies: 1
![]() |
•
•
Join Date: May 2008
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
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
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
•
•
Join Date: Feb 2008
Posts: 46
Reputation:
Rep Power: 1
Solved Threads: 3
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' />"
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
- Previous Thread: How to send email directly from Application to other emails without opening my emaili
- Next Thread: Inline GridView Editing


Linear Mode