Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with DataGrid

Status
Not open for further replies.
Nov 21, 2000
26
US
I am working on an application that tracks Projects/Tasks for my company.
This application replaces a Microsoft Excel Spreadsheet (the data is now
contained in MS SQL 7 SP2).

In Excel, they would change a cell background to fit a particular employees
color (Yellow for one person, light blue for another and so forth).

Now they are very stuck on that "feature" and really want me to duplicate
that abillity.

My form (frmProjects) had a Data Grid on it (dgProjects) and uses an ADODC
object (adoProjects) to gather the information from SQL. The SQL table
contains a Field called Next_Actor that contains the initials of the next
person that needs to react to the project, and a field called Next_Step
which is what they need to do.

So if The Next Actor is SP then the backgound for the Next_Step cell for
that project should be yellow.

Is this possible? Am I using the correct Controls/Objects?

 
Hi

Unfortunately, the datagrid is not flexible enough to even specify individual cell properties.
Maybe we'll see some of that in future versions.
The problem is you need to have that functionality now.
You can actually stay with MS Excel instead of migrating to a VB app.
The problem is there's not enough room to move when using Excel and if you looking fo power, advanced programming logic then you're basically stuck with VBA.
You can write a query within Excel that accesses the SQL Server and places the content from the SP / or select query in a sheet.

Data -> Get External Data -> Create New Query

and follow the prompts

Getting back to VB, you can use the MS Flex Grid or MS Hierarchical Flex Grid.

The downside of using these controls is it's not intrinsically editable. In other words you have to simulate the datagrid's editing feature when using any Flex grid
You can add data to the cells programmatically but it doesn't allow that feature by default.
Basically, when using any of the Flex Grids you're going to have to do some serious coding but you'll be able to provide the users with a very smart interface.

It's also better to connect to your datasource through code & then simulate the binding that comes naturally to databound controls...it's faster & powerful as well.

Sheridan the third party guys have a nice (but not free) grid that's very flexible.

Ultragrid can be found on
Hope this helps
caf

BTW: If indeed you want to start with any of the flex grids & need some assistance just reply to the thread and I'll see if I'm able to help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top