Question Advice on a flexible spreadsheet-like control

Shep

New member
Joined
Jan 25, 2010
Messages
4
Programming Experience
10+
Hello,
I'm trying to determine whether it would be feasible to create a control which behaves as I describe below, or whether there is a third party control which meets those needs.

(I've looked at Farpoint Spread, but not in great depth)

My client would like to be able to display rows of data related to the shipment of cargoes, by ship, around the world. There is a trading floor-like atmosphere at the client's offices.

The client hired me to produce an application which facilitates their trading/shipping activities, which I've done.

However, some of the brokers are accustomed to working with certain tools whose flexibility is difficult to reproduce in a VB or .NET application, and some of them are dissatisfied with my approach.

The tools they've used in the past are mostly spreadsheets. They also use a website which presents a spreadsheet control that several people can view and update. The sheet can be shared with others, so several brokers can operate with the same data.

They can add new records to this format, of course, but there is no easy way for them to save the new records into a database on their servers and maintain the formatting and validation necessary. I've built a fairly extensive database to house their data.

In other words, some of the old-timers are very old school and want to use an application which mimics the tools they've used for years. I can certainly understand this, being an old-timer myself.

Their director wants them all to use the new application, but some are balking.

To satisfy their needs and to keep my backend and client relevant (and worth the money the client pays me), I'd like to explore writing a control or adapting an existing control which allows for the following:

1. Spreadsheet-like control which will display rows of data.
2. User should be able to move and group rows at will.
3. User should be able to move/drag a row down the page, skipping one or more blank rows and drop their moved row there.
4. User should be able to edit the data in the cells.
5. Rows should maintain their original primary key or unique index. In other words, the record or row which is being represented should remain integral.
6. User should be able to persist the edited rows.
7. Developer should be able to process/validate edits on each cell before committing an edited row.

I've experimented with the OWC spreadsheet. As a spreadsheet, it seems just fine. I've inspected the object model and do not see a way to make the thing as flexible as described above. In addition, even if Farpoint Spread can fit the need, I doubt the client will spring for a license. I certainly don't want to.

The users don't need the capabilities of a true spreadsheet. They just need a flexible grid which doesn't care where you drag your rows on it, basically.

If anyone can point me to a Microsoft control or give me some guidance how I might begin writing or extending such a control, I'd appreciate it.

Thanks,
Shep
 
It sounds like you want:

A DataGridView showing data from a DataView that is based on a DataTable. The table has 2 columns not shown in the grid, but they control the order of rows
One column is group, the other is row number
The DataView orders by group, then number

Change the order rows appear in by changing the values of these columns. Consider changing the background colour or cell borders with custom cell view controls, if the group number changes between adjacent rows

If a group must appear in the middle of ungrouped rows then the before and after ungroups will have to belong to a group themselves e,g, 0 and 999

Let me know if you need more clarification. Expect to do a lot of grid customising for this
 
Thank you, cjard.

I don't need any more clarification. You've presented a clear path forward for me. Excellent work. I'll find the (70 page) document I have somewhere and study the DataGridView in detail.
 
Back
Top