table

SQL Table Aliases - Good or Bad?

What are the pros and cons of using table aliases in SQL? I personally try to avoid them, as I think they make the code less readable (especially when reading through large where/and statements), but I'd be interested in hearing any counter-points to this. When is it generally a good idea to use table aliases, and do you have any prefe...

Configurable Table Prefixes with a .Net OR/M?

In a web application like wiki or forums or blogging software, it is often useful to store your data in a relational database. Since many hosting companies offer a single database with their hosting plans (with additional databases costing extra) it is very useful for your users when your database objects (tables, views, constraints, and...

SQL Server 2005 - Export table programatically (run a .sql file to rebuild it)

I have a database with a table Customers that have some data I have another database in the office that everything is the same, but my table Customers is empty How can I create a sql file in SQL Server 2005 (T-SQL) that takes everything on the table Customers from the first database, creates a, let's say, buildcustomers.sql, I zip that f...

CSS overflow table row positioning

I have table inside a div tab. The table has 40 rows in it and the div's height is set to show 10 rows of that table. CSS's overflow:auto lets me scroll through the 40 rows. All is well there. How can I, with JavaScript cause the table to programatically position to a given row (ie, programmatically scroll the table up or down by row)?...

HTML drag and drop sortable tables

Ever wanted to have an HTML drag and drop sortable table in which you could sort both rows and columns? I know it's something i'd die for. There's a lot of sortable lists going around but finding a sortable table seems to be impossible to find. I know that you can get pretty close with the tools that script.aculo.us provides but i ran ...

Should Tables be avoided in HTML at any cost?

It is advisable to use tables in HTML pages (now that we have CSS)? What are the applications of tables? What features/abilities does tables have that are not in CSS? Related Questions Tables instead of DIVs DIV vs TABLE DIVs vs. TABLEs a rebuttal please ...

Why not use tables for layout in HTML?

It seems to be the general opinion that tables should not be used for layout in HTML. Why? I have never (or rarely to be honest) seen good arguments for this. The usual answers are: It's good to separate content from layoutBut this is a fallacious argument; Cliche Thinking. I guess it's true that using the table element for layout h...

SqlServer create table with MySql like auto_increment primary key

I want to make a table in SqlServer that will add, on insert, a auto incremented primary key. This should be an autoincremented id similar to MySql auto_increment functionality. (Below) create table foo ( user_id int not null auto_increment, name varchar(50) ) Is there a way of doing this with out creating an insert trigger? ...

How to stretch an HTML table to 100% of the browser window height?

I'm using a table to design the layout of my web page. I want the table to fill the page even if it doesn't contain much content. Here's the CSS I'm using: html, body { height: 100%; margin: 0; padding: 0; } #container { min-height: 100%; width: 100%; } And I place something like this in the page code: <table id=...

Make a div fill the remaining screen space

I am currently working on a web application, where I want the content to fill the height of the entire screen. The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom. I have a header div and a content div. At the moment ...

How to scroll only the right side of a table, listview, or datagrid?

Let's say I have data structures that're something like this: Public Class AttendenceRecord Public CourseDate As Date Public StudentsInAttendence As Integer End Class Public Class Course Public Name As String Public CourseID As String Public Attendance As List(Of AttendenceRecord) End Class And I want a table that looks som...

JSF how do I retrieve the selected rows of a woodstock table

I have a JSF woodstock table with checkboxes. When a row is selected I want to do some processing with those items. I managed to get a selection of RowKey objects but can't find out how to get the original objects I put in back. The table is populated by an ObjectListDataProvider. ...

A more advanced table/spreadsheet SWT implementation

I'm developing an application based on Eclipse's Rich Client Platform that relies heavily on the use of tables for showing and editing data. I'm currently using the SWT implementations of Table and TableViewer. My users are forever complaining that it "doesn't work like in excel". Most notably, I can't select a single cell within a row...

Best approach for sortable table with a lot of data

On our web application, the search results are displayed in sortable tables. The user can click on any column and sort the result. The problem is some times, the user does a broad search and gets a lot of data returned. To make the sortable part work, you probably need all the results, which takes a long time. Or I can retrieve few r...

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 to line up items of varied length in a resizable space in CSS?

I'd like to line up items approximately like this: item1 item2 i3 longitemname i4 longitemname2 anotheritem i5 Basically items of varying length arranged in a table like structure. The tricky part is the container for these can vary in size and I'd like to fit as many as I can in each row - in other...

I need my html table's body to scroll and its head to stay put

I am writing a page where I need an html table to maintain a set size. I need the headers at the top of the table to stay there at all times but I also need the body of the table to scroll no matter how many rows are added to the table. Think a mini version of excel. This seems like a simple task but almost every solution I have found on...

For tabular data, what renders faster, CSS or <TABLE>?

I am looking for some stats on current browsers for how long it takes to render a table using plain HTML versus a hacked-up CSS puritan method that avoids using actual TABLE, TR, TD, etc. tags. I am not looking for what's proper, only for what's faster, particularly on Firefox 3, although I am also interested in the stats for other brow...

DIV with overflow:auto and a 100% wide table problem

I hope someone might be able to help me here. I've tried to simplify my example as best I can. I have an absolutely positioned DIV, which for this example I've made fill the browser window. This div has the overflow:auto attribute to provide scroll bars when the content is too big for the DIV to display. Within the DIV I have a table t...

Hiding table rows without resizing overall width...

Is there a way to hide table rows without affecting the overall table width? I've got some javascript that shows/hides some table rows, but when the rows are set to "display: none;" the table with shringk to fit the contents of the visible rows. ...