473,569 Members | 2,791 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

lightweight grid

G'day all,
I want to load comma sep text files and display it in a grid. I'd like
something simple and lightweight. Don't need to edit it in grid, I could
do that in textboxes if required.
tia
build
Jul 17 '05 #1
2 2432
read the file with a streamreader and add the content to a table row.bind the table to a grid. hope this helps

phil
"build" <bu************ @datafast.net.a u> wrote in message news:41******@n ews.alphalink.c om.au...
G'day all,
I want to load comma sep text files and display it in a grid. I'd like
something simple and lightweight. Don't need to edit it in grid, I could
do that in textboxes if required.
tia
build
Jul 17 '05 #2
> I want to load comma sep text files and display it in a grid. I'd like
something simple and lightweight. Don't need to edit it in grid, I could do that in textboxes if required.


If you use an MSFlexGrid control, you can load your CSV text files via
the Clip property (which requires you to select enough cells to house
all the data... for what you want, simply select the entire grid). Place
a MSFlexGrid on your form and give this code a try...

Rick - MVP

Dim FileNum As Integer
Dim TotalFile As String
FileNum = FreeFile
' Reads the entire file into memory all at once
Open "c:\SomeDirecto ry\TextFile.txt " For Binary As #FileNum
TotalFile = Space(LOF(FileN um))
Get #FileNum, , TotalFile
Close #FileNum
TotalFile = Replace(Replace (TotalFile, vbNewLine, vbCr), ",", vbTab)
With MSFlexGrid1
' Assuming user can't select a cell
' .HighLight = flexHighlightNe ver
' Select every cell
.Row = .FixedRows
.Col = .FixedCols
.RowSel = .Rows - 1
.ColSel = .Cols - 1
' Fill them
.Clip = TotalFile
' Get rid of selection and pick cell to be active
.Row = 1
.Col = 1
End With

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1796
by: Jeremy Hylton | last post by:
Lightweight Languages 2004 (LL4) http://ll4.csail.mit.edu/ Dec. 4, 2004 MIT, Cambridge MA Call for Presentations LL4 will be an intense, exciting, one-day forum bringing together the best programming language implementors and researchers, from both academia and industry, to exchange ideas and information, to challenge
1
1961
by: Guinness Mann | last post by:
Greetings, I'm working in VS2003.NET using C#. I need to download a few rows from an SQL Server database table and then be able to page back and forth through them. I don't need to make any changes nor post any updates. In the past I've downloaded the rows using a datareader, copied the fields for each row into a structure and then...
0
1583
by: tjr7933 | last post by:
Has anyone implemented the OMG lightweight log spec into a c++ application? #! rnews 1946 Xref: xyzzy comp.lang.lisp:150483 Newsgroups: comp.lang.lisp Path: xyzzy!nntp From: Jeffrey Cunningham <jeffrey.k.cunningham@boeing.com> Subject: PCL question about using &rest and &key parameters together X-Nntp-Posting-Host: medea.sea.boeing.com...
3
1529
by: Ramza Brown | last post by:
I am sorry if I think like this, but sometimes(keyword sometimes) I like distributing my interpreters. Anyway, I found the absolute minimum libraries needed for Python to work with Win32. And, I included FLTK for the GUI toolkit. Sorry, but wxPython didn't fit my <30MB requirement. You can basically download it and find out what...
0
2634
by: Andrew Fedoniouk | last post by:
Announce: Lightweight HTML forms layout manager and browser component. http://HtmLayout.com Latest version of HtmLayoutSDK contains sources of wrapper for .NET (C#) Andrew Fedoniouk. http://terra-informatica.org
2
1639
by: MS News | last post by:
Hello When I spawn a lightweight process on a new Thread and return immediately to the Client what happens if the lightweight process takes an hour to finish? Under what context is the process running Is it running under the current Session. How do I insure that It will run until it is completed Please point me to an artical
2
14698
by: Martin Halle | last post by:
Dear all, I'm using XML in a project. This is a very simple and small file that follows an even simpler XSD schema. I've found a lightweight library (TinyXML) to read and access the contents of the XML file in C++. Now I'm looking for something similar to validate a given XML file agains a XSD schema. This library should: - be lightweight...
11
2363
by: garyusenet | last post by:
I have 'cli via c# on order', and in the mean time am reading 'Pro C# 2005 and the .NET platform' (Andrew Troelson). I'm just reading about the 'five types defined in the CTS'. Specifically Struct. Now Troelson described the struct type as 'a lightweight class type having value based semantics'. Looking at his example I cant see any...
6
7978
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data, call determined functions, and edit the data already present What will you need to use the grid? A table with standard markup and an ID to call the...
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7917
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7665
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6277
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5501
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.