User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: May 2008
Posts: 5
Reputation: painthu is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
painthu painthu is offline Offline
Newbie Poster

sorting in a custom grid view

  #1  
May 16th, 2008
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2008
Posts: 46
Reputation: a496761 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 3
a496761 a496761 is offline Offline
Light Poster

Re: sorting in a custom grid view

  #2  
May 19th, 2008
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' />" 
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP.NET Marketplace
Thread Tools Display Modes

Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 2:41 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC