Formcontrols

  • Thread starter Thread starter C# Beginner
  • Start date Start date
C

C# Beginner

Hi there,

I'm trying to gain access to a listview via a dialogform, setting the
listviews modifier property to Public, but it doesn't seem to work.

I'm using the code:

this.ParentForm.lvUsers.

Can anybody help me out here?

thnx
 
Hi,

Try casting ParentForm to the Type that actually has lvUsers as a public
property:

((YourDialogForm) this.ParentForm).lvUsers
 
That did the trick...

much thnx


Dave Sexton said:
Hi,

Try casting ParentForm to the Type that actually has lvUsers as a public
property:

((YourDialogForm) this.ParentForm).lvUsers
 

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