I am looking for a freeware grid control for ASP.NET C# Webforms. It would behave similar to Excel.

The rows will be sequential dates, and the columns are my equipment numbers.

I want to be able to to scroll indefinitely, with the dates increasing or decreasing depending which way I am going, incrementing by a day.

The idea is that I can double click on a date, in the correct equipment column, and then create a booking for one or more days. I am currently using a spread sheet, but I want to write a web app for more functionality.

In the cells I need to colour them as the attached image, but I also want to add indicator icons as to the status of the booking (quote, accepted, paid, etc, as as well as driver assignment icon)

Does anyone know of a control, or is there a native C# control that I could make work?

Sample

2 Replies 2

You can use angular in client side and implement AG grid. Using this you can dynamically render the rows and style using CSS classes as required. In your web forms page, implement an Api (WebMethod/ASHX) that returns blocks of rows

Well, before you worry about the UI here, you REALLY want to develop a correct database model.

Your attempting to do data processing and workflows using a Excel like approach. You will fast find that such an approach is doomed to failure.

So, you want a booking record, with a StartDate, or even StartDateTime, and then a EndDateTime.

That way you can with ease “move” a booking around. And with a correct design, then you simply change the start (or end) date of that booking record, and then your grid display will correctly update. And this would also be required to prevent booking collisions. That means then if you say simply change the “end date” of a booking record, then the grid display can be correctly updated.

It not clear if you have a database designed already. But, it’s critical that you design this database first.

And next up? You don’t want to hard code the unit/equipment/truck/hotel room etc., or whatever it is you plan to display into that Grid as a column name. That will NOT WORK!

Your screen shot shows 5 units, but it’s not clear how many you have, or if this will change over time. If you drive this application from a database, then you can’t on the fly change, or add columns to the database. But, you can always with ease add more rows!

So, building a correct database “schema” and design will allow you to build summary reports etc. And that again means you CAN NOT adopt a design in which the number of data columns changes! Databases don’t take well to such a design (changes to columns for a unit name).

Worse yet, the code you write to drive such a system also does not take well to having the number of columns change. In near all cases, then that means your code, your layouts, your reports etc. will all break if the column number changes (or is not fixed).

You thus need what is called a normalized data design, and without such a design, then your code, and ANY kind of grid control going to fail.

With a correct design, then you can take a machine off line (book it off line), or add new machines etc. without code or layout design changes.

And do you REALLY need some form that just scrolls forever? That’s going to be rather difficult, and 9 out of 10 times, you again don’t need such a UI. This is going to not only stress the server, but keep in mind that a web browser is 1000’s of times slower then a direct CPU to display like Excel has on one computer.

And keep in mind that we can’t really use a “document” like approach (such as Excel). Since if two users are working, and one makes changes? Then one or the other person will “over write” the changes. With Excel, it is a “whole” document. So, if you had/have two users editing, then the last person to save their copy will overwrite everyone’s else’s changes, right?

If you going to build a information system, then build one, and use a normalized (and correct) database design, not a Excel like design. If you going to do data and workflow processing, then design a database to do this. This NEAR ALWAYS means we are down to a design in which we are doing data row processing (we resolve all code and actions to ONE data row), not whole document processing like Excel is.

With Excel, then we really don’t get multi-user processing here. A display that say defaults to some window time (say 1 week previous to say 2 or 3+ weeks ahead should suffice here.

Using existing controls, such as a GridView, or often better say a ListView? Then consider this layout:

enter image description here

Even if you don’t want (or even like) the above layout, one still needs a correct database design. You need that before you start layout and even writing of code. So, you could I suppose cross-tab (have unit/machine/hotels across the top).

With a good database design, then the code practically write’s it self.

I would take horrible code and a good data design any day over that of fantastic code, but a poor data design. You wind up writing more and more code, and achieving less and less results – don’t start with a poor data design.

So, I'm not really sure that some grid control will solve your issues here, but no matter what road you take, you need a good database design first....

As a FYI, the above control was the native GridView control.

Your Reply

By clicking “Post Your Reply”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.