Refreshing a datagrid and it flashes

  • Thread starter Thread starter Scott M
  • Start date Start date
S

Scott M

I have a datagrid that is bound to a typed dataset.

I also have a time on my form and during it I an filling a table on the
dataset using the FillDataset method on the Data Application Block (v2).
This is great and works fine except that the datagrid that I'm bound to has
scroll bars that are flashing while I'm performing my update to the
dataset...

A little code:
Dim tablename() As String = {JobStepsDataSet.Tables(0).TableName}

StatusStepsDataGrid.SuspendLayout()

JobStepsDataSet.Clear()

SqlHelper.FillDataset(CONNECTION_STRING, CommandType.StoredProcedure,
"procDTSGetLastRunExecution", JobStepsDataSet, tablename, aparam)

StatusStepsDataGrid.ResumeLayout(False)


I have to clear the dataset so I don't get double data in the datatable.
And the syspendlayout method of the datagrid doesn't seem to be keeping the
flicker from happening. (By flicker I mean the scrollbars are shrinking
then coming back to "filled" size")

Anyone know how I can take care of this?

THANKS!

Scott
 
Scott,

I assume you have already tried every normal property/method for that.

What I thought about was faking.
Creating two datagrids, in a way that when you update, copy the dataset and
set that copied one as datasource for the faking one. Present that by making
it visible to your screen, and direct make the original invisible and when
your operation is done change those again.

This kind of operations goes normally that fast that the user does not see
it (when the topleft position and all other things are the same of course).

It is of course a workaround not the solutions, because I think you did
already try everything and than something when I shouldneed it would try (I
did not do that)

I hope it helps (and when it does, reply than we know, it is just a guess
for nothing)

:-)

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

Back
Top