DataGrid with optional columns and automatic width/height

Michael Schwarz on Monday, January 19, 2004

I have created a first test for a datagrid that allows you to add optional columns that are displayed if there is enough space on the screen. The columns have a minimum width and can grow as there are no additional columns.

You can have a look on a sample page on http://demo.pctopp.com/cvsched.aspx [1] or http://demo.pctopp.com/ordcust.aspx [2].

To login you can use the username planning with the password planning. The page will only work correctly with Internet Explorer 5.5 or higher. If you are on the page cvsched.aspx you can see that the page will not have any scrollbars (a minimum of 800px). If you resize the window and press F5 (reload page) you will see additional columns and if you have changed the height of the Internet Explorer you will see more rows.

This page is for order planning in the corrugated industry. You can see the machine 31 and the orders that are scheduled on this time. If you want play arround with this demonstration webpage.

Note: I am using webservices to save/get values for the user. Therefor I will create an instance of the Microsoft.XMLHTTP object on the client.