Solved

special customise grid for real world presentations.

Posted on 1998-09-28
5
142 Views
Last Modified: 2010-04-30
It seems that the grids present in VB at times do not help for real situations. Those grids allow to have as many columns in a row(record) to be displayed but the end user
will have to scroll to the right to see some of the columns.
I saw an application that had like a customised version that
allow to have more than one row(record) to be displayed on two screen lines or more. The initial screen displayed just three row(records) and uses a vertical control that looks just like the data control to scroll vertically to enter or
see more records. I think they created a control made up of a frame array and added text boxes,command butons, combo list to it,  each frame represented a row. They created an element of the array for each row.  Can you give me an idea as to how I can do this?.
This type of controls are of major used in business applicatons such as sales orders, purchase orders, etc.
The number of rows is usually between 1 to 20. Total number
data entry fields maybe 50 to 100.
0
Comment
Question by:cami
5 Comments
 
LVL 2

Expert Comment

by:AllenC_Jr
ID: 1437119
I Think they Used painting methods, loading as many textboxes as you suggested would be very memory consuming
they could have the cells printed and when you click on it it makes a hidden text box visible, the textbox could move, you could have a mousedown(x,y) checker that would check the field's position(the field's  x,y could be in memory). When the scrollbar is changed(value wise) you could move the object that you printed the information on left or right...

this is just a suggestion.
0
 

Author Comment

by:cami
ID: 1437120
Edited text of question
0
 

Author Comment

by:cami
ID: 1437121
Edited text of question
0
 
LVL 2

Expert Comment

by:shchuka
ID: 1437122
Look at the latest TrueDBGrid from Apex software (www.apexsc.com).  This is THE most powerful grid control ever.  Even the version I used two years ago was great.  The new one allows displaying records on multiple rows and lots of other stuff.
0
 
LVL 3

Accepted Solution

by:
TheAnswerMan earned 150 total points
ID: 1437123
I Use TrueGrid 5..  its kick butt. and does allow multiple rows also..

However.. what YOU can do.. is Use a frame.. (I use SSFrame) and place a few textboxes or labels or combos in there..

Then all you have to do is LOAD another copy of the frame and fill the values in.

You WILL get a memory and resource penalty if you do too many like this.  So what I do is Store everthing in an array..
and I limit the Number of "Rows" which can me seen. <this can change if your form size can change.. so you might want to have a fixed form size until you get this working.. then work on the fact that you can have varying rows..


so anyway.. what I do is have a variable call
CurrentRow.
I know how many of the Multiple Rows that will fit in the "Grid"
say 5/..
 as the user goes through the list... the CurrentRow changes..
and I call a FILLGRID Procedure and Pass int  the CurrentRow..
This Procedure will Display the ArrayItems(currentRow) to ArrayItems(CurrentRow + 5)

That way.. if you have 1000 rows in the Table.. I still only have to Show 5 Rows<5Frames> at any one time.

IT makes it Fast.. and VERY Customizable.


If the Screen Size might Vary.. instead of using 5 as the Number of available Rows..  Calculate The Rows you can show and Modify a Form level Variable during the Form_Resize event..
then the
FillGrid Procedure will Display the ArrayItems(currentRow) to ArrayItems(CurrentRow + RowsToShow)

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now