473,770 Members | 3,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fit the height of rows in datagrid


With a datagrid :
PreferredRowHei ght sets all rows to the same height, whether the text
needs to wrap or not.

I would like to dynamically adjust the row height for those rows of
the datagrid that require it as necessary.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #1
0 928

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

Similar topics

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
4741
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
1736
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;
3
1497
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
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? --
0
9591
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
9425
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,...
1
10002
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
9869
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
8883
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...
0
6676
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3970
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
3575
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.