bring value from popup window to parent window c# (ListView) Programming Software Development by darrylnuyda … window. I have a code collected in the online for PopUpform: private void srchbtn_Click(object sender, EventArgs e) { searchmember popup = new… event write something like this to load popup form: PopupForm form1 = new PopupForm(); if(form1.ShowDialog()==DialogResult.OK) // popup form is loaded… Re: Display data from database in a form(in textbox) after listview_double click Programming Software Development by Oxiegen … that form based on the title. Dim frm As New PopUpForm(title) frm.ShowDialog frm.Dispose() End If End Sub [/CODE… Re: bring value from popup window to parent window c# (ListView) Programming Software Development by Mike Askew You would most likely use logic along the following lines. 1. Have a public facing property on the pop-up form. 2. When a row is chosen on the pop-up form, set the property to the details of the row (briefly discussed below). 3. Back in the main form, during the `if` check for the `ok` response from the pop-up, if it is true, you retrieve the … Re: bring value from popup window to parent window c# (ListView) Programming Software Development by Lucaci Andrew I hope I didn't misunderstand your question: So let's say you have 2 forms, `Form1`, and `Form2`. Your main form is `Form1`, your popup form is `Form2`. You also have 1 textbox and one button on each of the forms, but when you click on the button from the `Form1`, you'll get the popup `Form2`, and when you click on the button from the `Form2`, you… Re: bring value from popup window to parent window c# (ListView) Programming Software Development by darrylnuyda @lucaci Andrew: Thank you for your reply, I think you understand my question about the popup form(form1 to form2, and Form2 to form1), How about in ListView in Form2, if I entered a data in textbox is viewing to the listView, after that I double click the ListView then the data will transfer to form 1. regards, Darryl Re: bring value from popup window to parent window c# (ListView) Programming Software Development by imam_1 To use MySql database with .Net you need to install ADO.Net Driver For MySql, you can get it from [mysql.com](http://www.mysql.com/products/connector/) Actually there are various ways to populate your database table into a ListView and retreive its value, you can either use database binding technique or simply use DataReader to read the entire … Re: bring value from popup window to parent window c# (ListView) Programming Software Development by darrylnuyda @imam: thanks for your answering about my query about on listView and MySQL connection. However, the code you given is okay, actually the code that i need is when I double click the listView in Form2 the dataContent will be transfer to form1. the ListView doubleClick in one Form is I got it already. If you have an Idea in my query , please help.… Re: bring value from popup window to parent window c# (ListView) Programming Software Development by imam_1 Based on your explanation, here is the steps i have in my mind : 1. On Form1.ButtonPopUp Clicked event, Create Form2 instance 2. Acquire the DialogResult from `frmSearhPopUp.ShowDialog()` call 3. If the DialogResult equals OK, set Form1 `txtIDNumber.Text` with your defined *field* on Form2 that hold the item selection value 4. Continue with your … Re: bring value from popup window to parent window c# (ListView) Programming Software Development by cgeier If you have a large dataset you may want to read about virtual mode. [Here is a post that discusses it](http://stackoverflow.com/questions/6089674/whats-better-to-use-a-datagrid-or-listview-for-displaying-large-amounts-of-dat) Re: bring value from popup window to parent window c# (ListView) Programming Software Development by cgeier As far as child-parent form communication. You could use events, which I think may be your best option. In my example, you will have 3 classes: "parentFrm", "childFrm", and "ValueUpdatedEventArgs". **ValueUpdatedEventArgs.cs** //ValueUpdatedEventArgs.cs using System; using System.Collection.Generic;… Re: bring value from popup window to parent window c# (ListView) Programming Software Development by darrylnuyda @cgeier: I tried your code, it's okay, I have a problem on this. How do I know that I get the data in ListView in Form2 to transfer in Form1? what do your mean string myValue = "some new value"; this? Please help.. Regards, Darryl Re: bring value from popup window to parent window c# (ListView) Programming Software Development by darrylnuyda @imam: I can't perform the code you given.. 4. If the DialogResult equals OK, set Form1 txtIDNumber.Text with your defined field on Form2 that hold the item selection value if (srcResult == DialogResult.OK) { txtIDNumber.Text = frmSearchPopUp.UserSelectedResult; //Continue to next query based on current txtIDNumber.Text value… Re: bring value from popup window to parent window c# (ListView) Programming Software Development by imam_1 > the TxtIDnumber.Text is the TextBox on the form1 right?. Yap, it's a TextBox on *Form1*, the name is based on your [image](http://i61.tinypic.com/2lvy5vd.jpg%5B/IMG%5D) post > UserSelectedResult - for this what is all about? in form1 this code is error.. if you like to, please provide the error description so we can trace its actual … Re: bring value from popup window to parent window c# (ListView) Programming Software Development by darrylnuyda @imam1: I got it. thanks ; How about if I obtain all columns in ListView1? it is possible? I tried to perform, but the result it is not good. Regards, Darryl Re: bring value from popup window to parent window c# (ListView) Programming Software Development by imam_1 simply declare some other variables on form2 to obtain every column value or you can define an entity object to store row details then to assign it to ListViewItem.Tag property for later use //a class definition that hold search result entity public class SearchResult { public string idNumber; public string firstName; … Re: bring value from popup window to parent window c# (ListView) Programming Software Development by imam_1 simply declare some other variables on form2 to obtain every column value or you can define an entity object to store row details then to assign it to ListViewItem.Tag property for later use //a class definition that hold search result entity public class SearchResult { public string idNumber; public string firstName; … Re: bring value from popup window to parent window c# (ListView) Programming Software Development by cgeier Ok. I've made an example specific to your situation. I didn't do the database data retrieval however. I'll let you work on that part. I've made a note of where you should do the database retrieval (in SearchMemberFrm.cs). To run my example you will need the following. On "Form1.cs": * Textbox named: idNumberTextBox * Textbox named: … Re: bring value from popup window to parent window c# (ListView) Programming Software Development by cgeier Here is an updated version of "SearchMemberFrm.cs". It uses a DataGridView instead of ListView. I think that DataGridView is a better option. "SearchMember.cs" requires the following: * Button named: searchBtn * DataGridView named: dataGridView1 *Note: Just add a DataGridView. Do NOT configure any columns or add any events. … Re: bring value from popup window to parent window c# (ListView) Programming Software Development by cgeier Here's a program I wrote to remove the line numbers from code posted on this site. It will save you some time copying the code to run my examples. To use "Form1.cs" you need a form that contains: * TextBox named: userMatchPatternTextBox * Button named: resetBtn * Button named: runBtn * Button named: clearAllBtn * RichTextBox named: … Re: bring value from popup window to parent window c# (ListView) Programming Software Development by darrylnuyda @imam: i tried your code example, but I can't understand, where I can input the code. Re: bring value from popup window to parent window c# (ListView) Programming Software Development by darrylnuyda Hi Everyone: can i asked your help, please check the image below: 1. Membership form for new applicants. a. After I saved the registration for the new member I want to go the #2 2. Search Members. a. Purpose: to select if the members is registered or not. b. Is the members is view, double click to transfer in membership form. 3. Back to … Re: bring value from popup window to parent window c# (ListView) Programming Software Development by castajiz_2 You've listed a lot of things what exactly is the main problem that s keeping you behind? Re: bring value from popup window to parent window c# (ListView) Programming Software Development by darrylnuyda @castajiz: the main problem on that is bring value from popup window to parent window form. regards Darryl Re: bring value from popup window to parent window c# (ListView) Programming Software Development by cgeier See my tutorial on [form communication](http://www.daniweb.com/software-development/vbnet/tutorials/475628/how-to-pass-data-between-two-forms-in-vb-.net). This one is for vb .net. I don't have time to write one for C# right now. The code I previously posted in your question (above) is how do it in C#. If you read the one for vb .net it should … Re: bring value from popup window to parent window c# (ListView) Programming Software Development by darrylnuyda @cgeier: Okay I will Explore this tutorial.