column-width

CSS to make a table column take up as much room as possible, and other cols as little

I need to layout a html datatable with CSS. The actual content of the table can differ, but there is always one main column and 2 or more other columns. I'd like to make the main column take up as MUCH width as possible, regardless of its contents, while the other columns take up as little width as possible. I can't specify exact width...

How do I databind a ColumnDefinition's Width or RowDefinition's Height?

Under the View-Model-ViewModel pattern for WPF, I am trying to databind the Heights and Widths of various definitions for grid controls, so I can store the values the user sets them to after using a GridSplitter. However, the normal pattern doesn't seem to work for these particular properties. Note: I'm posting this as a reference quest...

Actual pixel size of columns attribute for asp.net textbox

What is the exact pixel size of one column when I used the columns attribute to determine a width of an ASP.NET textbox control? <asp:TextBox id="MyTextBox" runat="server" columns="10" /> ...

What is the best way to implement 'Excel like column sizing' for an HTML table?

Basically, I want to allow the user to resize columns in an HTML table, using the same method as you would in Excel. Drag the space between columns and size. I did some research on this last year, and found a few hacks and kludges. Most were pretty bad, and I didn't find anything really good. Now, it looks like I need to implement th...

How can I set a <td> width to visually truncate its displayed contents?

I'm trying to set a column width of a table, which works fine until it gets to the point where child elements would be visually truncated ... then it won't size any smaller. ("visually truncated"-what doesn't fit appears to be hidden behind the next column) Here is some sample code to demonstrate my problem: <!DOCTYPE html PUBLIC "-//...

automatically calculating column width in JTable

What's the preferred way of this (based on header & contents width I believe)? TIA. ...

MS Access: How can I automatically reduce Text columns to an appropriate size for the data stored in them?

MS Access has a passable text file import wizard. (File -> Get External Data -> Import.) Unfortunately, text columns (fields) are always imported with 255-character size, regardless of the actual data found in the input file. How can I reduce these 255-character Text columns to a reasonable size without manually doing a bunch of "SELECT...

ASP.NET GridView - Prevent Word-Wrapping in Column

On an ASP.NET GridView, I have a field that prints a string from the database. This data can range from 10 to 100 characters. When it is longer than normal, the field word-wraps the data, making the row take up more vertical space than the others. I want to truncate any data that does not fit on the row, and then have a "..." next to ...

How to resize table columns width from JavaScript

Hello, I have a problem with javascript. I have a list of table cells stored at TabList. I want to find the maximum width, and then set this width to all of them. A sample code is here, but the setting of the width is not working. var MaxTabWidth = 0; for (var i = 0; i < TabList.length-1; i++) { if (TabList[i].offsetWidth>MaxTabWidt...

setting a prototype value (for auto-width calculation) of a JTable column

either this doesn't exist, or I'm not thinking/searching correctly because it's late... I want to set a JTable column width in Swing based on a prototype value for the largest string I expect (or know) to exist in a particular column. I don't know the # of pixels since I don't necessarily know the font at compile time. Is there a way t...

Dynamically change the width of Datagrid column in FLEX.

Hi, Can we change the width of the datagrid column dynamically by clicking on the border of the column in order to display the complete string which is too long to be displayed and needs to be scrolled ? If so, How ? Also, how can we ensure that the column width changes dynamically based on the number of characters / length of string; ...

WPF DataGrid column widths and reordering

I have a DataGrid defined as <wpftoolkit:DataGrid x:Name="AccountsDataGrid" AutoGenerateColumns="False" ItemsSource="{Binding Path=Accounts}" ColumnReordered="DataGrid_ColumnReordered" SelectionUnit="FullRow" RowHeaderWidth="0" HorizontalAlignment="Stretch" VerticalAlignmen...

Flex DataGrid Column Width

In my flex app I store the widths and visiblility of columns in an xml file. When the app loads it reads from the xml file and sets he columns values as applicable: for(i = 0; i < columnsOrder.length; i++){ newOrder[i] = myDG.columns[Number(columnsOrder[i]) - 1]; newOrder[i].visible = (Number(columnsVisiblity[i]) == 1); newO...

Flex 3 DataGrid Column Width Problem

I'm pulling xml data to determine which columns are visible, and the widths of each column. My datagrid's width can change sinces its on one side of a HDividedBox. The visibility part works, but setting the width is causing headaches. Heres the code: for(loop through column data retrieve from XML) { newData[i] = dg.columns[Number(c...

WPF TexBlock in Grid in ListView not Sizing Correctly?

I have a TextBlock that is in a Grid that is an ItemTemplate for a ListView. I have the items so that they grow when the window is resized, but I cannot figure out how to have the TextBlock be limited to that size. I've tried to do this with the width on the ColumnDefinition - if I set the Width to a fixed number (say 350) the text wra...

How do you prevent a user from resizing the column width of a clistctrl (report view)?

How do you prevent a user from resizing the column width of a clistctrl (report view)? ...

Actual width of a text/caption in Delphi 7

I believe this question was already asked, but it was in Java, so I couldn't understand the solution. Here is my problem, I want to know actual length of the text in pixels (note that various letters have different length in some fonts). I am going to use this for better column width adjustment in DBGrid. Thank you, Tofig Hasanov ...

Horizontal scrollbar past the min-width point

HTML: <div id="mcolWrapper"> <div id="mcol"> <div class="wrapper"> content </div> </div> </div> <div id="lcol"> <div class="wrapper"> content </div> </div> <div id="rcol"> <div class="wrapper"> content </div> </div> CSS: #mcolWrapper { float: left; width: 100%; } #mcol { ma...

How do i convert 100% into px in HTML

Hi, I am making a slider based component in GWT. Parent : width = 100% .-------------------------------------------------. | .---------------------------------------------. | | | Child : width = X | | | '---------------------------------------------' | '-------------------------------------------------' where...

How do I make a TDBGrid's columns fit the grid's width?

I've got a TDBGrid with predefined columns, and I just can't get the width right. I can mess with the Width property of the columns in the Form Designer and get the width to look just right at design time, but at runtime, for whatever reason, the columns tend to be significantly wider, and I end up with a scroll bar at the bottom of the...