I have a Gridview showing a bunch of data. Now what I want is to show is the data with 10 rows in a page in Gridview. Also I do not want vertical scroll in Gridview, but horizontal scroll is required.
I am putting the Gridview inside <DIV> and setting its properties as below :
<div style="overflow-x:auto; overflow-y:hidden;">
//MyGridView here
</div>
But the problem is that although the 10 rows of data is showing perfectly fine, I dont see the pager at the bottom of the grid. If I change the position of pager to "top" then its visible at the top of gridview. Please help...This has been bugging me for a couple of days now :(
Actually you set the vertical overflow to hide in div. Remove overflows and use the div like
<div>
or like
<div style="overflow-x:auto; overflow-y:auto;">
Please Mark as Answer if find helpful -- Nasser -- Skype: maleknasser1
Have you tried removing the overflow-y? Setting it to hidden will cause things that are beyond the specified height to be hidden.
Overflow-y is only effective when you have also set height. What have you set height to?
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.
amadikted
0 Points
3 Posts
Pager hidden in Gridview
May 15, 2012 04:48 PM|LINK
I have a Gridview showing a bunch of data. Now what I want is to show is the data with 10 rows in a page in Gridview. Also I do not want vertical scroll in Gridview, but horizontal scroll is required.
I am putting the Gridview inside <DIV> and setting its properties as below :
But the problem is that although the 10 rows of data is showing perfectly fine, I dont see the pager at the bottom of the grid. If I change the position of pager to "top" then its visible at the top of gridview.
Please help...This has been bugging me for a couple of days now :(
new.preetam
Member
16 Points
20 Posts
Re: Pager hidden in Gridview
May 15, 2012 05:27 PM|LINK
did u try by removing 'overflow-x:auto;'?
if it works then try to provide some other value, except auto.
Nasser Malik
Star
10990 Points
1691 Posts
Re: Pager hidden in Gridview
May 15, 2012 06:01 PM|LINK
Actually you set the vertical overflow to hide in div. Remove overflows and use the div like
<div>
or like
<div style="overflow-x:auto; overflow-y:auto;">
Skype: maleknasser1
amadikted
0 Points
3 Posts
Re: Pager hidden in Gridview
May 16, 2012 07:23 AM|LINK
If I use overflow-y:auto then it will bring a vertical scroll too, which I do not want...
I just want a horizontal scroll. And pager is showing if I change its position from bottom to top...
Qin Dian Tan...
All-Star
113532 Points
12480 Posts
Microsoft
Re: Pager hidden in Gridview
May 17, 2012 08:43 AM|LINK
Hi,
A workaround is you can use a custom pager control outside the GridView and Scroll div:
http://www.codeproject.com/Articles/20870/A-very-nice-and-complete-custom-GridView-pager-wit
http://www.codeproject.com/Articles/11418/Pager-Control-for-ASP-NET
http://msdn.microsoft.com/en-us/library/ms972960.aspx
Thanks,
If you have any feedback about my replies, please contactmsdnmg@microsoft.com.
Microsoft One Code Framework
superguppie
All-Star
48225 Points
8679 Posts
Re: Pager hidden in Gridview
May 21, 2012 09:15 AM|LINK
Have you tried removing the overflow-y? Setting it to hidden will cause things that are beyond the specified height to be hidden.
Overflow-y is only effective when you have also set height. What have you set height to?
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.