how to fill datagrid faster

  • Thread starter Thread starter jaYPee
  • Start date Start date
J

jaYPee

I have already done some code to fill the datagrid. my problem is that
the fill method is too slow after executing my code.

here is the scenario.

i have a parent/child form. all is datagrid. one datagrid is a parent
and the other is a child. now when i finish encoding data from the
first datagrid (which is the parent) i have to click the check box
button on that grid and fill the 2nd grid w/ the data from the other
table base on the criteria on the first table. i'm using stored
procedure to insert data. but the problem is when i reload the dataset
using the fill method the execution is too slow.

here is my code.
DsStudentCourse1.Tables("SchYrSemCourseJoin").Clear()
SqlDataAdapter3.Fill(DsStudentCourse1) 'this code makes the
execution slow

this code will clear the data first then fill again so that the newly
inserted record will be refresh.

my question is on how can i speed loading a data on my datagrid.
 
jaYPee,

Faster is a real relative conception.

However in my idea can you get better ask this as well in the newsgroup

microsoft.public.dotnet.framework.adonet

You know of course that this is not to tell you go away here and if I was
you I would surely check any answer here as well.

Problem with your question is that you need to know a lot about your
application, the data your are filling (when it is an immage by instance it
can be terrible slow) and the ammount of rows you are filling.

I hope it helps anyway something.

Cor
 
jaYPee said:
I have already done some code to fill the datagrid. my problem is that
the fill method is too slow after executing my code.

here is the scenario.

i have a parent/child form. all is datagrid. one datagrid is a parent
and the other is a child. now when i finish encoding data from the
first datagrid (which is the parent) i have to click the check box
button on that grid and fill the 2nd grid w/ the data from the other
table base on the criteria on the first table. i'm using stored
procedure to insert data. but the problem is when i reload the dataset
using the fill method the execution is too slow.

here is my code.
DsStudentCourse1.Tables("SchYrSemCourseJoin").Clear()
SqlDataAdapter3.Fill(DsStudentCourse1) 'this code makes the
execution slow

this code will clear the data first then fill again so that the newly
inserted record will be refresh.

my question is on how can i speed loading a data on my datagrid.

Maybe should look into optimizing your SQL statement. Maybe it already
is, but I've seen loads of people use very inefficient queries.
 
Back
Top