|
Rank: Advanced Member Groups: Member
Joined: 5/15/2009 Posts: 33
|
Hi,
I'm trying to add some buttons at the end of the grid, but they show up over or under the grid, not at the end. I'm not using the content pane. In all of your demo examples I've seen, you are using content pane.
My grid height and width are set to 100%, thus not sure how to add the buttons at the end and without using the content panel. Using the contentpane with the % seems to break.
Thanks, Mona
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I am not exactly sure what you mean by content panel. Can you post a test page?
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 5/15/2009 Posts: 33
|
For example in your demo for Grid - Appending new item in javascript if you take out the width and height from the grid and change the width and the height of the callbackpanel to 100%, the layout breaks. It seems that the % is not supported?
I have a dynamic grid and I would like to see it all in the page instead of scrolling up and down by setting the width and height.
Here is partial code from your demo- Appending new item with JS.
<eo:CallbackPanel runat="server" Width="100%" Height="100%" id="CallbackPanel1" Triggers="{ControlID:Button1;Parameter:}"> <eo:Grid id="Grid1" runat="server" PageSize="10" FullRowMode="False" GridLineColor="220, 223, 228" ColumnHeaderDividerImage="00050103" FixedColumnCount="1" GridLines="Both" GoToBoxVisible="True" ColumnHeaderAscImage="00050104" Font-Names="Tahoma" Font-Size="8.75pt" BorderColor="#7F9DB9" IsCallbackByMe="False" BorderWidth="1px" ColumnHeaderDescImage="00050105">
Please let me know if you need more info.
Thanks, Mona
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I see. Generally you should always try to give the Grid an explicit size because the Grid's main functionality is scrolling, it wouldn't know how to setup scroll bars unless it knows its size. The Grid works best with fixed pixel size and has limited support on percentage sizes. For example, you can have a DIV with a fixed size and then place the Grid inside it with a percentage size.
In addition, Height="100%" is usually relative the height of the form element, not the height of the document. This is a general HTML issue and has nothing to do with the Grid, but at times can be very misleading when dealing with sizing issues.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 5/15/2009 Posts: 33
|
I did not necassarily mean the grid to be 100%. All I would need is for the gris to show all on the page without scrolling.
I understand, but what if I don't want to see any scroll bars because the grid deson't grow that long. How would I go about displaying the buttons after the grid, knowing the grid is dynamic ( could have 25 or 30 rows; i.e. can't set a padding-top because don't know the exact height) ?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, In that case you can give the Grid an explicit width but do not set any height value. For example, the following code should function correctly:
Code: HTML/ASPX
<form id="form1" runat="server">
<div>
<eo:Grid ID="Grid1" runat="server" .....
ScrollBars="None" Width="300px">
.....
</eo:Grid>
<asp:Button ID="Button1" runat="server" Text="Button" />
</div>
</form>
Note ScrollBars is set to "None" and Width is set to a fixed pixel value. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 5/15/2009 Posts: 33
|
Thank you! Thank you! Thank you! This is exactly what I was looking for.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Great. Glad that it's working for you!
|
|