Avatar of Peter Kiers
Peter KiersFlag for Netherlands

asked on 

Get the data of a listview into a childform

Hi,

I have a listview on my form.

What I want is when I doubleclick on the row a childform appears
with a textbox with the text of the column Caption of the listview
in the textbox!

Who knows the anser and is willing to help me?

Peter
.NET Programming

Avatar of undefined
Last Comment
Peter Kiers
Avatar of Peter Kiers
Peter Kiers
Flag of Netherlands image

ASKER

I don't get further than this:

        private void listView1_DoubleClick(object sender, EventArgs e)
        {
            StickyNote fm2 = new StickyNote();
            fm2.ShowDialog();
         }
Avatar of Peter Kiers
Peter Kiers
Flag of Netherlands image

ASKER

I think it has to be something like this:      

 private void listView1_DoubleClick(object sender, EventArgs e)
        {
            frmNote.textBox1.Text = the text of de cell of the first colum of the listview <======
            StickyNote fm2 = new StickyNote();
            fm2.ShowDialog();
         }

Peter
Avatar of Peter Kiers
Peter Kiers
Flag of Netherlands image

ASKER

I have this but it's not working:

        private void listView1_DoubleClick(object sender, EventArgs e)
        {
            frmNote.textBox1.Text = listView1.SelectedItems[0].Text;
            StickyNote fm2 = new StickyNote();
            fm2.ShowDialog();
         }
ASKER CERTIFIED SOLUTION
Avatar of Peter Kiers
Peter Kiers
Flag of Netherlands image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Peter Kiers
Peter Kiers
Flag of Netherlands image

ASKER

I have found the solution myself.
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo