473,786 Members | 2,420 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Row height in datagrid

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?

Any help will be greatly appreciated!

--
Sandy
Nov 19 '05 #1
1 1567
Sandy,

Don't specify the grid's height and it will format itself nicely. If you
want it to look like it has fixed height, fake it by putting the grid in a
<div> with the same background color as for the grid. Specify the height for
the <div>.

Eliyahu

"Sandy" <Sa***@discussi ons.microsoft.c om> wrote in message
news:E5******** *************** ***********@mic rosoft.com...
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?

Any help will be greatly appreciated!

--
Sandy

Nov 19 '05 #2

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

Similar topics

0
1932
by: Serdar Kalaycý | last post by:
I have a DataGrid in my WebForm. I set its Height propert to 1px because if I give it a big number and there's less records then expected, it extends the rows giving a silly layout. So it gets longer as the records appear. But I'd like to add some textboxes to add a new record to the database (as I see, there's no method of datagrid to add new records) below the DataGrid and I'd like to set their Location dynamically exatly where the...
5
1876
by: Kat | last post by:
Hi, I'm trying to set up an asp.net page using flow layout so I'm putting all my controls into a table grid, etc. I use several radiobuttonlists and datagrids that are generated from datasource. The radiobuttonlists are fine, they size depending on how many item are called into it. However, the datagrids, prior to filling with data contain FIVE "Databound" items and the grid does not shrink if it is filled with only 2 for example....
3
2157
by: Mau | last post by:
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
2
2841
by: Elijsh | last post by:
I'm new to datagrid and VB.Net. Is there any way to adjust the height of datagrid textbox row according to the height of text programmatically ? I mean I have multiple data with varied length, some have one rows, some have three rows and maybe seven. How can I set the height programmaticalky? Your advice is greatly appreciated!
2
2605
by: | last post by:
Hi all. I need to change datagrid rows height dinamically, so each row shows all the text contained in the cell. There is a "PreferredRowHeight" property in the TableStyle of a datagrid, but it change all rows height to the same value. I need to have different row heights. Can you help me?? Bye Francesco
2
3399
by: Tor Inge Rislaa | last post by:
How to change row height in a DataGrid I have DataGrid that is filled with data from a table in a DataSet. The content of the cells is text of more than one line (as a note field). What I want is to set the height of the row based on the number of lines in it. The row height of each row in the table may be different from each other. Is there a way to do this?
5
4743
by: Dennis | last post by:
I have a class that inherits from DataGrid. I can set the rowheights in a DataGrid by tappig into the "get_Datagridrows" method. However, this does not work for classes that inherit from DataGrid. Anyone know how to do this on derived classes? I find it apalling that Microsoft provided a DataGrid that is so inflexible! -- Dennis in Houston
3
1742
by: Tor Inge Rislaa | last post by:
Hi, I have a need of controlling the row height of the individual rows in a data grid. The row height will be adjusted after the datagrid is filed with data and the height will be different for each row. How do I loop trough the rows and set the row height. TIRislaa
3
22037
by: Sharon | last post by:
I have a DataGrid that contains a few rows and column header. I wish to change the DataGrid height to be the exact height of the total height of the rows and column header, so that no gray area will be shown below the last row. I tried: int totalRowsHeight = dataTable.Rows.Count * (dataGridTableStyle.PreferredRowHeight + 1); Size gridClientSize = dataGrid.ClientSize;
7
3241
by: Localbar | last post by:
hi all, my problem is...i have 2 textbox for user input no. of row and no.of column. After user input, the datagrid will show what user input....for example: user input 5 rows and 6 column. After that...the datagrid will show.I would like to control the height for datagrid after generate... but i only can control the width....any one have idea about this. Thanks
0
9496
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
10164
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
10110
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
9961
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...
0
8989
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7512
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
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4066
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
3669
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.