Help with Unusual Datagrid Usage

  • Thread starter Thread starter Gene Hubert
  • Start date Start date
G

Gene Hubert

I'm looking to use a datagrid in an odd way and not making a lot of
progress. I want to read in a text file and then allow a user to
arbitraily divide the data into columns. I thought I might be able to
do this with a datagrid by capturing mouse events and then
adding/dropping/modifying columns and then redisplaying the data.

So far, I'm reading the data from a text file into a data store with
an OleDbDataAdapter and then setting the DataSource property of the
datagrid to the datastore. That displays the data nicely, but after
that I'm stuck. Several of the examples I've found for manipulating
datagrids assume the datasource is a datatable and don't seem to work
for me.

I'm not looking for detailed solutions, but just a few pointers on how
to get started. I'm open to any solution, even it it does not use a
datagrid.

Thanks much for any assistance,
Gene in North Carolina
 
if you think its possible/easy by using a data table, why not use one ?

create a data table with one column, and read each line of text into a data
row one column long...

when you need to add a column (split the text), create a new data table
with the additional column, read each data row from the old column and
split it into the appropriate number of columns for the new table. then
set the datagrid.source to your new data table.

Does this seem plausible ?



--------------------
From: (e-mail address removed) (Gene Hubert)
Newsgroups: microsoft.public.dotnet.languages.vb
Subject: Help with Unusual Datagrid Usage
Date: 25 Sep 2003 05:14:06 -0700
Organization: http://groups.google.com/
Lines: 19
Message-ID: <[email protected]>
NNTP-Posting-Host: 198.85.98.225
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1064492047 3055 127.0.0.1 (25 Sep 2003 12:14:07 GMT)
X-Complaints-To: (e-mail address removed)
NNTP-Posting-Date: 25 Sep 2003 12:14:07 GMT
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.co
m!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!postnews1
..google.com!not-for-mail
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:141083
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

I'm looking to use a datagrid in an odd way and not making a lot of
progress. I want to read in a text file and then allow a user to
arbitraily divide the data into columns. I thought I might be able to
do this with a datagrid by capturing mouse events and then
adding/dropping/modifying columns and then redisplaying the data.

So far, I'm reading the data from a text file into a data store with
an OleDbDataAdapter and then setting the DataSource property of the
datagrid to the datastore. That displays the data nicely, but after
that I'm stuck. Several of the examples I've found for manipulating
datagrids assume the datasource is a datatable and don't seem to work
for me.

I'm not looking for detailed solutions, but just a few pointers on how
to get started. I'm open to any solution, even it it does not use a
datagrid.

Thanks much for any assistance,
Gene in North Carolina

Matt Evans
--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
 
It sounds way more plausible than anything I would have come up with.

Thanks a bunch.

Gene in NC
 
Back
Top