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
Rose Rouge
NA
27
8.7k
Change Value of Cell of DataGridView
Jun 24 2016 5:28 AM
I have 2 forms:
Form1 contains DataGridView.
Form2 contains Textboxes, radioButton and Button.
When I select DataGridView Row it will show me Form2 and Displayed their values in TextBoxs . Every Thing seems better just now.
What I want know is after displaying datas in textboxes , I check the RadioButton then click in the button it will return to Form1 of The selected Row and
Change The value of Cell 5
.
Here there is My code:
Form1
private
void
dataGridView1_RowHeaderMouseDoubleClick(
object
sender, DataGridViewCellMouseEventArgs e)
{
DataGridViewCell cell =
null
;
foreach
(DataGridViewCell selectedCell
in
dataGridView1.SelectedCells)
{
cell = selectedCell;
break
;
}
if
(cell !=
null
)
{
DataGridViewRow row = cell.OwningRow;
string
objet = row.Cells[0].Value.ToString();
string
objectif = row.Cells[1].Value.ToString();
string
date = row.Cells[2].Value.ToString();
string
commentaire = row.Cells[3].Value.ToString();
string
client = row.Cells[5].Value.ToString();
string
commercial = row.Cells[6].Value.ToString();
Détails_RDV détails =
new
Détails_RDV();
détails.obj = objet;
détails.objectif = objectif;
détails.date = date;
détails.comm = commentaire;
détails.clt = client;
détails.commer = commercial;
détails.Show();
}
}
Form2
public
partial
class
Détails_RDV : Form
{
public
string
obj ;
public
string
objectif;
public
string
date;
public
string
comm;
public
string
clt ;
public
string
commer;
public
Détails_RDV()
{
InitializeComponent();
}
private
void
Détails_RDV_Load(
object
sender, EventArgs e)
{
txtObjet.Text = obj;
txtObjectif.Text = objectif;
txtDate.Text = date;
txtCommerci.Text = commer;
txtClient.Text = clt;
txtCommentaire.Text = comm;
}
private
void
btnValider_Click(
object
sender, EventArgs e)
{
if
(radBtnEffectue.Checked ==
true
)
{
//What should I write here??
}
}
How Can I do That ?
Please help, Thanks in Advance
Reply
Answers (
4
)
How to parse a resume using C#.net
How to move selected item of listview C#