Welcome Guest Search | Active Topics | Sign In | Register

EO:Grid Options
steved
Posted: Tuesday, February 21, 2012 10:51:05 AM
Rank: Member
Groups: Member

Joined: 2/6/2012
Posts: 13
Hi,

This may seem illogical but I am adding rows to a grid in code behind i.e. Grid.Items.Add(---) but I do not want to display any scroll bars I just want to show the last 6 or so rows added (after a postback to the server) but the grid expands vertically as I add a new row. Is there a way of restricting the height of the grid just so it shows the top 6 or so rows ? "Height=nnpx" doesn't work.

Thanks.
Craig C.
Posted: Tuesday, February 21, 2012 11:59:11 AM
Rank: Member
Groups: Member

Joined: 1/16/2012
Posts: 17
This doesnt seem like a EO issue if I understand you correctly. But why wouldnt you just limit the the items you add to the grid to 6. But you can do what you ask using CSS's Overflow property: http://www.w3schools.com/cssref/pr_pos_overflow.asp
eo_support
Posted: Tuesday, February 21, 2012 5:57:54 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Steve,

Craig is correct. You should write the code to limit the items you add to the Grid to 6. The Grid takes whatever you add to it as is. So if you add 10 items, then it will have 10 items. There is no such feature on the Grid that shows you only X number of last items. You have to write code yourself to do that.

Thanks
steved
Posted: Wednesday, February 22, 2012 3:46:35 AM
Rank: Member
Groups: Member

Joined: 2/6/2012
Posts: 13
Hi,

Thanks for the reply. It's just the fact that the code is all written to accept approx 500 rows (and 6 actually showing on the grid control) into the grid and add new rows as and when needed which all works fine with scroll bars but the customer asked if the scroll bars could be removed but still scroll with the mouse wheel but as I stated earlier I was hoping to set the scroll bars to none without any code changes as the work has been paid for but if that doesn't work then I will have to re-work it. Thanks for your help.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.