473,397 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Help with Unusual Datagrid Usage

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
Nov 20 '05 #1
1 1538
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: gw******@hotmail.com (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: <7e**************************@posting.google.com >
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: gr**********@google.com
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-mailXref: 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.

Nov 20 '05 #2

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

Similar topics

19
by: Thue Tuxen Sørensen | last post by:
Hi everybody ! I´m maintaining a large intranet (approx 10000 concurrent users) running on one IIS box and one DB box with sqlserver 2000. Currently there is 2,5 GB Ram, 1 1400 mhz cpu and 2...
4
by: Pete Davis | last post by:
I'm using a web form DataGrid. When I populate the grid, I set the DataSource to a collection and then call DataGrid.DataBind(). When looking at the DataGrid in the debugger, the DataSource is set...
11
by: Junkguy | last post by:
I need some help programmatically causing a row in a DataGrid to "flush" its contents to its bound data (in Visual Studio 6 using Windows Forms with C#). My issue is I want to send an update to...
4
by: hmedinapy | last post by:
has anyone had a issue like this... My application (VB .net) starts using about 20% from cpu, and slowly increase the cpu usage to 100%. I need to know any factor that hs influence on cpu...
2
by: William A. Sempf | last post by:
Hi, everyone. Posting this in the IIS group, because I don't think it is an ASP.NET question, crossposting because I am not sure. Apologizing in advance. I have a page with a datagrid that...
2
by: Daniel | last post by:
I'm new to .Net and all of its abilities so I hope this makes sense. Basically I'm confused on when is the appropriate time to use web forms controls vs. regular HTML. For example in ASP...
4
by: steroche | last post by:
I would REALLY appreciate help please please please! Im sure it is probably blindingly obvious to most of you but I am totally in the dark here!I am lost - i thought i had finally figured out this...
2
by: Neo Geshel | last post by:
Greetings! I have a rather unusual request about a rather basic need. I need to be able to bind data to a page, but WITHOUT using a Repeater, DataGrid or DataList. Why? Well, I have some...
10
by: sheldonlg | last post by:
I got an unusual request. One customer wants a password/access made available to a user that is valid for only, say, ten minutes. I know that I can enforce this by having a revalidation of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.