DataGrid with optional columns and automatic width/height
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 or http://demo.pctopp.com/ordcust.aspx.
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.
5 Comments
Comments have been disabled for this content.
Adam Weigert said
Nice looking grid you got there ...
Michael Schwarz said
Thanks! Did you get the optional columns?
Adam Weigert said
Yes, that is quite a nice trick. :)
Paschal said
Can I suggest something, because I think what you did is quite good.
Can you have an automatic reload if I resize the window. Not every user would know that they have to refresh the page.
Using an onload for example.
Anyway well done
Michael Schwarz said
Yes, of course, there can be an automatic refresh if I resize the window. This is only a small optional setting. For this website product it is not high priority because the website will refresh if there is a data change...