TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David Ditudidi
NA
7
0
How to display data on a new instance of an existing form?
Jul 24 2011 4:05 AM
Hi,
I'm new to c#.
I am buil
I have a datagrid where that displays a few cells about projects and when the user clicks on a row I want to open a new instance of the projects form and display all the projects info (from a MySQL db).
I'm stuck on how to pass the data to the new instance of the projects form.
The new instance of the form displays ok, but how to reference the original form's text boxes and other objects is the problem I have.
Please help!
below is the line of code:
public void projectGrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
//Public String sid;
//string sid = projectGrid.Rows[projectGrid.CurrentRow.Index].Cells["ID"].Value.ToString();
project f1 = new project();
f1.Show();// How to make this form load with the correct data?
}
Thanks
David
Reply
Answers (
8
)
Property
How to keep user input after closing ?