2
Answers

determine when user pressed btnSearch or ...

elham deljooei

elham deljooei

12y
1.3k
1
Hi everyone
i want to determine when user pressed buttonX1 or selected a row from dataGridViewX1 then run its command.
i don't know i should look at what...
i don't know, i should use what property or...
private void btnUpdatUser_Click(object sender, EventArgs e)
        {
            if (?????????????????? )
            {

              
            }
            else
            {
                MessageBox.Show("error");
            }
         }
3:27:28 PM


Answers (2)
0
elham deljooei

elham deljooei

NA 84 49.8k 12y
Hi
i have some Textbox and a dataGridViewX1. i want of user click buttonX1_Search or a row from dataGridViewX1 then i get id from and i can  do update with id.
I want to use of property or event or method from buttonX1_Search or dataGridViewX1 when distinguish selected. Indeed i want to determine when user selected this buttonX1_Search or one row from dataGridViewX1 then run its command. my purpose get Id from table with dsitinguish selected buttonX1 or dataGridViewX1

private void btnUpdatUser_Click(object sender, EventArgs e)
        {
            if (if
buttonX1_Search or dataGridViewX1 selected fro example equal true )
            {

              
            }
            else
            {
                MessageBox.Show("error");
            }
         }

0
Nilesh Avhad

Nilesh Avhad

NA 684 197.2k 12y
Can you clear your problem more precisely or paste your code or design and what you want to do?