Q: DataView with Table with large number of rows

G

G .Net

Hi

I'm hoping that somebody can help me with the following:

I have a DataTable which I'm displaying in a DataGrid. I am changing values
in this grid which need to be passed back to the DataTable and then back to
the database source.

In the grid, I sometimes only want to show some of the rows i.e. I filter
it. I do this by using a DataView to the DataTable and then filtering the
DataView which is the source to the grid.

All well and good so far!

However, I have recently added several thousand new rows to the DataTable.
When I set the DataView using:

MyDataView.Table = MyDataSet.Table("MyBigTable")
MyDataView.RowFilter = "[Col1] = 2"

However, this takes several seconds to do the first line! There are
approximately 400,000 rows in it. However, using the filter I may only be
drawing out 20 rows.

Can anybody suggest how I can speed this up?

Thanks in advance

G
 
G

G .Net

Sorry yererui, I don't follow

G

yekerui said:
Hi,

Did you ever read the article Development guide with OleDBProNet at
http://www.udaparts.com/devguide.htm

Read it. You'll know the reason.


G .Net said:
Hi

I'm hoping that somebody can help me with the following:

I have a DataTable which I'm displaying in a DataGrid. I am changing
values in this grid which need to be passed back to the DataTable and
then back to the database source.

In the grid, I sometimes only want to show some of the rows i.e. I filter
it. I do this by using a DataView to the DataTable and then filtering the
DataView which is the source to the grid.

All well and good so far!

However, I have recently added several thousand new rows to the
DataTable. When I set the DataView using:

MyDataView.Table = MyDataSet.Table("MyBigTable")
MyDataView.RowFilter = "[Col1] = 2"

However, this takes several seconds to do the first line! There are
approximately 400,000 rows in it. However, using the filter I may only be
drawing out 20 rows.

Can anybody suggest how I can speed this up?

Thanks in advance

G
 
C

Cor Ligthert [MVP]

G.

You have always make your choise what to do on the server and what on the
client.

In this sitation it is in my idea completely clear that you should not use
here a dataview but a Where clause in your select statement.

Cor
 

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