I am not able to click on any part of GridView to sort the coloumn. Kindly help me. I can only able to click on text portion of griview cloumn header, but I need functionality which will allow me to sort by clicking anywhere and not only on text portion.
You will need to make each Cell in the Column an anchor (HyperLink) like in the Header. The Header anchor does a PostBack with a Command to do the Sort. If you want to Sort from another place, the same PostBack is needed.
To make it so you can click the entire Cell, instead of just the Text, style it with display:block.
Superguppie.
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
When all you've got is a Hammer, Every Problem looks like a Nail. Michael Swain.
shantanus
0 Points
1 Post
should be able to click on any part of the colum to order by
May 07, 2012 03:30 AM|LINK
Hi,
I am not able to click on any part of GridView to sort the coloumn. Kindly help me. I can only able to click on text portion of griview cloumn header, but I need functionality which will allow me to sort by clicking anywhere and not only on text portion.
Thanks,
Shan
ZeeshanAnsar...
Participant
878 Points
264 Posts
Re: should be able to click on any part of the colum to order by
May 07, 2012 04:29 AM|LINK
in headerTemplate of gridview add a button and on the click of the button sort the relevant column as you want.
you may hit the database to sort that column.
Please 'Mark as Answer' if this post helps you.
superguppie
All-Star
48225 Points
8679 Posts
Re: should be able to click on any part of the colum to order by
May 11, 2012 02:32 PM|LINK
You will need to make each Cell in the Column an anchor (HyperLink) like in the Header. The Header anchor does a PostBack with a Command to do the Sort. If you want to Sort from another place, the same PostBack is needed.
To make it so you can click the entire Cell, instead of just the Text, style it with display:block.
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
When all you've got is a Hammer, Every Problem looks like a Nail. Michael Swain.