473,771 Members | 2,347 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid - Row height on last page

I have data that spans over several pages in a datagrid.

On the last page, the row heights seem to justify vertically, so if there
are say 14 records and the paging is ten, each row on the last page will take
up a quarter of the grid height.

Is there any way so that the row height will always be the same regardless
of the height of the grid or the number of rows being displayed?

--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
Mar 11 '08 #1
3 1497
If you don't set the grid's height, it will keep the same height for all
rows.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Phil Johnson" <Ph*********@di scussions.micro soft.comwrote in message
news:E8******** *************** ***********@mic rosoft.com...
>I have data that spans over several pages in a datagrid.

On the last page, the row heights seem to justify vertically, so if there
are say 14 records and the paging is ten, each row on the last page will
take
up a quarter of the grid height.

Is there any way so that the row height will always be the same regardless
of the height of the grid or the number of rows being displayed?

--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com

Mar 11 '08 #2
Thanks for that Eliyahu,

I will try setting the row height and removing the grid height then.
--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
"Eliyahu Goldin" wrote:
If you don't set the grid's height, it will keep the same height for all
rows.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Phil Johnson" <Ph*********@di scussions.micro soft.comwrote in message
news:E8******** *************** ***********@mic rosoft.com...
I have data that spans over several pages in a datagrid.

On the last page, the row heights seem to justify vertically, so if there
are say 14 records and the paging is ten, each row on the last page will
take
up a quarter of the grid height.

Is there any way so that the row height will always be the same regardless
of the height of the grid or the number of rows being displayed?

--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com


Mar 11 '08 #3
If you worry about the very last row, in some cases you can trick the user
by placing the grid inside a <divwith the same background color. The user
will perceive it as a single grid and you don't need to worry about the last
row height.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Phil Johnson" <Ph*********@di scussions.micro soft.comwrote in message
news:C6******** *************** ***********@mic rosoft.com...
Thanks for that Eliyahu,

I will try setting the row height and removing the grid height then.
--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
"Eliyahu Goldin" wrote:
>If you don't set the grid's height, it will keep the same height for all
rows.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Phil Johnson" <Ph*********@di scussions.micro soft.comwrote in message
news:E8******* *************** ************@mi crosoft.com...
>I have data that spans over several pages in a datagrid.

On the last page, the row heights seem to justify vertically, so if
there
are say 14 records and the paging is ten, each row on the last page
will
take
up a quarter of the grid height.

Is there any way so that the row height will always be the same
regardless
of the height of the grid or the number of rows being displayed?

--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com



Mar 11 '08 #4

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

Similar topics

8
2340
by: Gilles T. | last post by:
How I can get element ID in the edit mode of datagrid control? If I not in the edit mode, there are no problem. <asp:TemplateColumn ItemStyle-CssClass="grid_column_width_3" ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="top"> <ItemTemplate><%# CType(Container.DataItem("DateStatut"),DateTime).ToString("yyyy-MM-dd") %></ItemTemplate> <EditItemTemplate> <asp:TextBox width="80" CssClass="edit_item" id="txtDateStatut"
3
4266
by: Richard | last post by:
I have a requirement to put a GDI style circle or rectangle border around the selected row of a datagrid/ It will overlap into the row above and below the selected row. Doing this in a the OnPaint of a subclassed DataGridTextBoxColum dos not seem like a practical way to do it. I have subclassed a DataGrid and overridden the OnPaint as such:
3
2784
by: CVerma | last post by:
Hi, I have an embedded datagrid within a datalist. I am not able to perfrom paging in the datagrid. Any ideas? Here is my code: Here is my Simplegrid.cs file: using System; using System.Collections; using System.ComponentModel; using System.Data;
9
5066
by: tshad | last post by:
How do I find (and set) a couple of labels in the Footer after a DataGrid is filled? I have a bunch of DataGrids that get displayed nested inside a DataList. The datagrid looks like: ******************************************************************************* <asp:DataGrid visible="False" border=1
1
1565
by: Sandy | last post by:
Hello - I have a datagrid with scrollbars and paging. I have tried setting the row height of the header, pager, footer and Itemstyle. Everything functions great until I hit the last page when the last page consists of less rows than the page size. On the last page, the row height becomes large and looks horrible. What am I doing wrong?
2
3442
by: Mike Baugh | last post by:
I am using visual studio 2005 to develop a form using c# I have 3 datagrids on one form. I can set the row color based on a certain value in a column. However this color applies to all 3 datagrida. I would like to set it so that if value of column 3 in datagrid 1 is < 100 set to red, if = 100 set to green if value of column 3 in datagrid 2 is < 90 set to red, if >= 90 set to green if value of column 3 in datagrid 3is < 80 set to red,...
6
2738
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...
1
1888
by: Brock | last post by:
First note that I am using Framework 1.1. I have an .aspx page that is displaying a list of employees, but only the Employee Number, First Name, Last Name, and Title. It is working great. I recessed it in a <Div></Divto allow scrolling of just the data, not the page. What I need to do is place a DataList (also in a <Div></Divto allow scrolling of just the data) to the right of the Datagrid to show 40 Employee Detail fields (listed top to...
1
1921
by: Brock | last post by:
Thanks in advance... (you can see a screenshot of what my form looks like currently at http://www.juggernautical.com/DataGrid.jpg - the Datalist is super-imposed in 'design view' but the DataGrid is the actual running of the page) I've almost got this working (?) but need a little help. I have an .aspx page that has a DataGrid listing employees with a "Select" button that is to be used to populate the DataList to the right of the DataGrid...
0
9619
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
9454
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
10260
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...
0
10102
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
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.