Solved

VB Table

Posted on 2004-09-06
10
259 Views
Last Modified: 2010-05-02
Hi All,

I would like to build a simple VB application in which I will display data from a text file, organized in a table.
Clicking on each field, in a row, of the table, will open another dialog.

At first the table will have no lines, but as it reads (in real-time) the text file, it will start displaying the rows of data, according to some rules. Once the length of the table exceeds the length of the form, a vertical scroll bar will appear to allow to scroll up & down, to see the different rows in the table.

My Main question is what control should I use for the table ?

In addition - Can anyone give advice on how to do this? I'm not a VB expert so please keep it simple.

I'll be glad to get links to sample code.

Thanks.
0
Comment
Question by:chayahd99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 18

Expert Comment

by:JR2003
ID: 11991769
Do you want to click on a row or a field?
The standard  controls to use are a Listview or a Flexgrid.
You may have som problems detecting which field is clicked on for a Lstview though the control itself is much nicer to use.
0
 

Author Comment

by:chayahd99
ID: 11991838
I want each row to contain 3 buttons/labels so each can be clicked seperately.

I believe ListView treats each row as one entity.
What is FlexGrid ? That sounds interesting...
0
 

Author Comment

by:chayahd99
ID: 11991925
The FlexGrid looks good, I just have 2 questions I couldn't find answers for:

1. Must I bind it to a data source or can I just read data from the text file & display it in the grid?

2. Can I get rid of the bands so they don't appear at all ?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:mladenovicz
ID: 11994584
1. you can add data manualy (without datasource) use vbtab as column separator

Private Sub Form_Load()
    mfg.Cols = 3
    mfg.Rows = 1
    mfg.AddItem "a" & vbTab & "b" & vbTab & "c"
    mfg.AddItem "a" & vbTab & "b" & vbTab & "c"
    mfg.AddItem "a" & vbTab & "b" & vbTab & "c"
    mfg.AddItem "a" & vbTab & "b" & vbTab & "c"
End Sub

2. I am not sure if I understood you properly, but check the followinf grid properties: FixedCols, FixedRows, GridLines, GridLinesFixed
0
 
LVL 3

Expert Comment

by:redfordb
ID: 11994645
I would recommend the Listview control at vbaccelerator.com (http://www.vbaccelerator.com/home/VB/Code/Controls/ListView/article.asp).
It has some very nice added functionality over the standard listview control.
0
 

Author Comment

by:chayahd99
ID: 12003876
mladenovicz,

When I add items to the FlexGrid as you explained, can I define some of the items to be buttons or other controls or could they display only text ?

redfordb,

Does the Listview control at vbaccelerator.com enable clicking on each of the cells to open another dialog ?
0
 
LVL 3

Expert Comment

by:redfordb
ID: 12003906
Yes
0
 
LVL 8

Expert Comment

by:mladenovicz
ID: 12004318
I don't think so. Actually, I am using 3rd party flex grid (VideoSoft Flex Grid - www.componentone.com) that have possibiltiy to display checkboxes, combo boxes, ...
0
 

Author Comment

by:chayahd99
ID: 12004494
redfordb,

Does the Listview control enable embedding controls (buttons, checkboxes, combo boxes, etc...) in the grid ?

Is it free ?

Thanks.

0
 
LVL 3

Accepted Solution

by:
redfordb earned 100 total points
ID: 12004551
The control is freeware, but to my knowledge you cannot bind controls to cells.

The S-Grid control on the same site can bind any control to a cell and is also freeware.
http://www.vbaccelerator.com/home/VB/Code/Controls/S_Grid_2/S_Grid_2/article.asp

0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

752 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