Hi Greg
 
Well something like your soln. is what I was looking for.  I knew you
could browse with alternative col names in Foxpro but wasn't aware you
could do it in MB.  The syntax of the Browse command in Help just says:
 
"Browse expression_list From table ..."
 
where "expression_list is either an asterisk or a comma-separated list
of column expressions" - no more explanation, like the fact you can do
what you've suggested.
 
Thanks very much for that, as usual, and I'll look into including the
browser window in my dialog (again was not aware of that), which sounds
like it would end up looking like a grid in a form - ideal!

Like I've always said, you only find these things out from a MI-L.
 
Respect!!!
 
Terry

________________________________

From: Driver, Greg 9434 [mailto:[EMAIL PROTECTED] 
Sent: 17 October 2005 14:16
To: Terry McDonnell
Subject: RE: MI-L Need to display data in a grid



Terry, 

When you issue the Browse command you can specify alternative names for
columns that are used in the browser window - 
Browse col1 "Name", col2 "Address" From Cust_list 

As you've already got meaningful names for the columns in another table
it would be a case of building the browser command based on the table
the user selected. (A bit like Peter's suggestion!)

Have you also looked at including the browser window in your dialog?
You could use the Control DocumentWindow clause to re-parent the browser
window and attach it to your dialog, so the browser window becomes
embedded within your dialog, rather than just creating a new browser
window.  If you have MapInfo V7.5 or later then have a look at the
Distance Calculator tool, which includes a browser and map window
embedded within a Dialog box. 

Greg Driver 

System Administrator 
Applications Support 
ICT 
Surrey Police 
Tel: 01483 48 2292 
Fax: 01483 48 2374 
Email: [EMAIL PROTECTED] 
NOT PROTECTIVELY MARKED 


-----Original Message----- 
From: Terry McDonnell [mailto:[EMAIL PROTECTED] 
Sent: 17 October 2005 12:54 
To: [EMAIL PROTECTED] 
Subject: MI-L Need to display data in a grid 


Hi List 
  
I don't expect this can be done but here goes: 
  
My users can select a table to view its contents.  The table is picked
from a list and can have any number of columns, each representing a
census named population, e.g. "Children under 5", "Ethnic minorities",
"car owners" - whatever.  I've no way of knowing what col's will exist,
or how many, until the file is selected.


Ideally I'd like to display the table in a grid, on a form, but these
concepts don't seem to exist in MI/MB - only dialogs.  As far as I can
see I can only display the data in a browse window, but then I won't get
meaningful column names - only the table's field names.  These tables
are derived from Foxpro tables and, as such, are registered from dBASE
III tables (Foxplus), and so the field/col names are 10 chars max.


I do have the meaningful names, mapped against the col names, in another
table. 
  
Any ideas? 
  
'ppreciate it 
  
Terry McDonnell 


Internet communications are not secure and therefore Surrey Police does
not accept legal responsibility for the contents of this message.  This
email and any attachments may be confidential. They may contain
privileged information and are intended for the named addressee (s)
only. They must not be distributed without our consent. If you are not
the intended recipient, please notify us immediately and delete the
message and any attachments from your computer, do not disclose,
distribute, or retain this email or any part of it. Unless expressly
stated, opinions in this email are those of the individual sender, and
not of Surrey Police. We believe but do not warrant that this e-mail and
any attachments are virus free. You must therefore take full
responsibility for virus checking. Surrey Police reserves the right to
monitor all email communications through their networks.


Reply via email to