将文本文件连接到数据网格 [英] Connecting a textfile to a datagrid

查看:84
本文介绍了将文本文件连接到数据网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我使用

a逗号分隔的文本文件作为数据网格数据所需的代码(或设计时间)吗?

Could someone please show me the code (or design-time) required to use
a comma-delimited textfile as data to a datagrid?

推荐答案

你好,


看看这篇博文:

http://weblogs.asp.net/donxml/archiv.../21/24908。 aspx


代码在C#中,但可以很容易地转换为VB.NET。基本的想法

是你使用Jet引擎为你加载CSV文件然后你

用结果填充DataSet。

一旦你拥有了DataSet,就可以将它绑定到DataGrid,就像你通常那样



问候,

-Adam。

mo****@hotmail.com 写道:
有人可以告诉我使用逗号分隔的文本文件作为数据网格数据所需的代码(或设计时间)吗?
Could someone please show me the code (or design-time) required to use
a comma-delimited textfile as data to a datagrid?


Mothim,


这是我为此制作的一个样本

http://groups-beta.google.com/group/...60b0997bb9a138


我希望这有帮助吗?


Cor
Mothim,

Here a sample I made for this

http://groups-beta.google.com/group/...60b0997bb9a138

I hope this helps?

Cor


我谢谢你。


2005年1月26日星期三12:24:5 8 +1030,Adam Goossens

< ad ********** @ users.sourceforge.net>写道:
I Thank you.

On Wed, 26 Jan 2005 12:24:58 +1030, Adam Goossens
<ad**********@users.sourceforge.net> wrote:
你好,

看看这篇博文:

http://weblogs.asp.net/donxml/archiv.../21/ 24908.aspx

代码在C#中,但可以轻松转换为VB.NET。基本的想法
是你使用Jet引擎为你加载CSV文件,然后你用结果填充一个DataSet。

一旦你有DataSet你就可以通常会将它绑定到DataGrid上。

问候,
-Adam。

mo****@hotmail.com写道:
Hi there,

Have a look at this blog post:

http://weblogs.asp.net/donxml/archiv.../21/24908.aspx

The code is in C# but can be converted to VB.NET easily. The basic idea
is that you use the Jet engine to load the CSV file for you and then you
fill a DataSet with the results.

Once you have the DataSet you can bind it to the DataGrid like you
normally would.

Regards,
-Adam.

mo****@hotmail.com wrote:
有人可以告诉我使用逗号分隔的文本文件作为数据网格数据所需的代码(或设计时间)吗?
Could someone please show me the code (or design-time) required to use
a comma-delimited textfile as data to a datagrid?





这篇关于将文本文件连接到数据网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆