Solved

special customise grid for real world presentations.

Posted on 1998-09-28
5
144 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

774 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