1,105,271 Community Members

how to create a pop up form in vb.net

Member Avatar
rony001
Newbie Poster
15 posts since Aug 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

how to create a pop up form for each row in datagridview that holds detailed info about that particular row of a column ? I want a editable pop up form with two text boxes and sum of both text boxes in the selected cell of the column . i don't know what approach to take ,
can someone provide me with a link please.

Member Avatar
SaaDwTk
Light Poster
38 posts since Nov 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

Why dont you create a form to act like a pop-up, that onload() load the datagrid information?

Member Avatar
khair.ullah
Junior Poster in Training
72 posts since Aug 2012
Reputation Points: -2 [?]
Q&As Helped to Solve: 6 [?]
Skill Endorsements: 0 [?]
 
0
 

create a new form and add three textBoxs with label i.e value 1 , value 2 , sum.
on Main form select the grid and goto property then Event - Click . Double click and add the follwing code.
Dim frm as new form1
Dim i As
Integer
i =
DataGridView1.
CurrentRow.Index
frm.textbox1.Text
= DataGridView1.
Item(0, i).Value

frm.TextBox2.
Text =
DataGridView1.
Item(1, i).Value

frm.TextBox3.
Text =
DataGridView1.
Item(0, i).Value +
DataGridView1.
Item(1, i).Value
frm.showDialog()

Member Avatar
Icone
Junior Poster in Training
87 posts since Oct 2012
Reputation Points: -1 [?]
Q&As Helped to Solve: 5 [?]
Skill Endorsements: 0 [?]
 
-1
 

A form that will pop up everytime you click on the datagridview's row is easy. Follow the shared code above by Khair.

Question Answered as of 1 Year Ago by Icone, SaaDwTk and khair.ullah
Member Avatar
rony001
Newbie Poster
15 posts since Aug 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Thanks for all replies , i got it to work

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article