473,887 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid with fixed height

Mau
I have a question:
I have a datagrid with paging (4 elements for page), header and footer
I set a fixed height: 600px

So the situation is (in a page with 5 elements)
6 rows (header + 4 elements + footer)
every with fixed height 100px, and this is ok

but in a page with 1 element (for example) I have
3 rows (header + 1 element + footer) every row is 200px height

Instead I would like to have: header 100px + 1 row 100px + 300px di blank
space + footer 100px
That is row, header and footer with fixed height and a blank space before
the footer
to fit the total fixed height.

What's the solution?
Can someone help me?

Thanks

M
Nov 18 '05 #1
3 2161
Hi Mau,
Keep a div in the page and keep the datagrid inside the div and specify the
height to the div instead of the datagrid.
HTH
srini

"Mau" wrote:
I have a question:
I have a datagrid with paging (4 elements for page), header and footer
I set a fixed height: 600px

So the situation is (in a page with 5 elements)
6 rows (header + 4 elements + footer)
every with fixed height 100px, and this is ok

but in a page with 1 element (for example) I have
3 rows (header + 1 element + footer) every row is 200px height

Instead I would like to have: header 100px + 1 row 100px + 300px di blank
space + footer 100px
That is row, header and footer with fixed height and a blank space before
the footer
to fit the total fixed height.

What's the solution?
Can someone help me?

Thanks

M

Nov 18 '05 #2
Mau
> Keep a div in the page and keep the datagrid inside the div and specify
the
height to the div instead of the datagrid.


ok, but in this case the footer move up and down if the
number of the elements of the datagrid page change
I would like to avoid this...

thnks

M
Nov 18 '05 #3
in that case you can try setting the ItemStyle, HeaderStyle and FooterStyle.
HTH
srini

"Mau" wrote:
Keep a div in the page and keep the datagrid inside the div and specify

the
height to the div instead of the datagrid.


ok, but in this case the footer move up and down if the
number of the elements of the datagrid page change
I would like to avoid this...

thnks

M

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2000
by: Stephen | last post by:
I have a datagrid and i'm trying to fix the width of one of the columns to be exactly 300px. My problem is that one of the records fields(CompanyName) is really long and has no spaces so it streches the whole datagrid accross the screen. Has anyone else ever experienced this problem and is there any way of fixing it. Basically my datagrid is streching to about 120% because of this one record. Would love to work out how I can change this...
1
2457
by: Lalit Bhatia | last post by:
how can we fix first column in DataGrid? Regards, Lalit Bhatia
0
1466
by: Lalit Bhatia | last post by:
thanks for the answer but I need it for windows forms. I have a desktop application where I need to implement this. -- Regards, Lalit Bhatia "Mona" <mona@discussions.microsoft.com> wrote in message news:OQ0wkCeZFHA.3220@TK2MSFTNGP14.phx.gbl... > Hi Lalit,
7
4679
by: Matthew Wieder | last post by:
Hi - I have a datagrid that has a black header and the rows alternate white and gray. The problem is that until items are added to the grid, the grid appears as a large black rectangle, which is quite ugly. The black area is larger then it is once an item is added. How can I solve this problem either by: A) Having only the header black and the rest of the empty block white or gray (preffered solution) B) Having the color gray or white...
2
1741
by: Carlo Marchesoni | last post by:
I have a very basic question using the DataGrid. What I want to achieve is controlling the size of it (specially the height of the rows). The DataGrid adjusts the row size according to the amount of rows bound - and if there are no rows at all, the DataGrid is visualized with a huge Header and nothing else. How can I avoid this ? Thanks a lot for your help
0
1084
by: Mau | last post by:
Hi, I've a datagrid with fixed height when I have few rows the height of single rows increase to fit the fixed height of the grid. I would like to have a blank space before the footer and fixed row size, instead. It's possible? How? Tnks
2
1558
by: Sam | last post by:
hi folks, 1. how to set column width in datagrid server control? 2. how to set row height in datagrid server control? 3. how to display scroll bar in datagrid server control? thanks,
2
10415
by: Charleees | last post by:
Hi all, I have a DataGrid with Template Columns..... There are LAbels,Linkbuttons in the Single Row.. I have to set the Constant Column width for those Template Columns in Grid... Wat actually happens is... when the Text size is too big... the column
6
2741
by: slinky | last post by:
I found the following code to transfer datagrid data to an Excel file. Is this written in C#?... I'm a vb.netter. I'm just not sure where to place the code to experiment on it. Should I place it in the event handler for a form button. Is there other ways to accomplish this? I looked at some on the web and usergroups, but was confused as to the functioning. BTW my datagrid is enclosed in a <div></divfor ease of scrolling if that would...
0
9957
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9799
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11173
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10875
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10432
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7988
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4238
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3245
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.