Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

VS 2010 How and what happens when I suspendbinding and resume binding in datagriview

$
0
0
Hey,

I am trying a different route with a current application. Initially I had used a for each loop that read my xml file and individually added rows and the data but felt that wasnt the best way to go. I am now attempting to simply bind my xml file as a datasource to the datagridview and it worked perfectly except I am unable to make rows invisible when needed.

I get the following error "Row associated with the currency manager's position cannot be made invisible."

After doing some research I found out that I am not able to make rows visible while my datasource is still bound, so first question. How do I declare the currency manager in vb?

Code:

        Dim myCurrencyManager As CurrencyManager =

        myCurrencyManager.SuspendBinding()

No idea what goes after the equal sign.

Second question if I unbind and then later use

Code:

myCurrencyManager.ResumeBinding()
Is everything simply updated in the source xml file ?

I was planning on unbinding my source right after load and rebinding it only when saving again. This is because I toggle the rows visibility a lot to filter data.

Thanks

Viewing all articles
Browse latest Browse all 27329

Trending Articles