csv to datagrid

S

Stanley Cheung

Hi all,

How can I import a csv file and display as a datagrid directly.
Now, I am using datatable to bind to datagrid, but I got the problem for
sorting and paging, i don't know how to make a sorting and paging.

Do I need to store data into dataset and sqldataadapter?
I am using c#.

Thanks in advanced.
steambun
 
D

Dmytro Lapshyn [MVP]

Hi,

Is it a WinForms or an ASP .NET grid?

The latter has built-in support for sorting and paging, the former supports
sorting but not paging (which though might be compensated with scrolling).
 
S

Stanley Cheung

Hi,

it is ASP.NET grid

Actually, I can control the sorting and paging if it querys from database
which has select connection string...
but if it stored into datatable or dataset... i don't know how to do that...

Thank you.
steambun
Dmytro Lapshyn said:
Hi,

Is it a WinForms or an ASP .NET grid?

The latter has built-in support for sorting and paging, the former supports
sorting but not paging (which though might be compensated with scrolling).

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]


Stanley Cheung said:
Hi all,

How can I import a csv file and display as a datagrid directly.
Now, I am using datatable to bind to datagrid, but I got the problem for
sorting and paging, i don't know how to make a sorting and paging.

Do I need to store data into dataset and sqldataadapter?
I am using c#.

Thanks in advanced.
steambun
 
C

Cor Ligthert [MVP]

Stanley,

You can use OleDb.

See this sample from Paul in C# the newsgroup General
(be aware that it is probably recoded VBNet)

http://groups.google.com/group/microsoft.public.data.oledb/msg/cfe81f3818e74ae3

I hope this helps.

Cor

Stanley Cheung said:
Hi,

it is ASP.NET grid

Actually, I can control the sorting and paging if it querys from database
which has select connection string...
but if it stored into datatable or dataset... i don't know how to do
that...

Thank you.
steambun
Dmytro Lapshyn said:
Hi,

Is it a WinForms or an ASP .NET grid?

The latter has built-in support for sorting and paging, the former supports
sorting but not paging (which though might be compensated with
scrolling).

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]


Stanley Cheung said:
Hi all,

How can I import a csv file and display as a datagrid directly.
Now, I am using datatable to bind to datagrid, but I got the problem
for
sorting and paging, i don't know how to make a sorting and paging.

Do I need to store data into dataset and sqldataadapter?
I am using c#.

Thanks in advanced.
steambun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top