0

I have two columns in gridview. One is textbox and the other is also a textbox.

If one textbox text changed , i need to perform some calculation and again need to fill automatically the second textbox.

(e.g) Ifi enter 10 in 1st textbox, i need to perform some calculation and again the result of that manipulation needs to shown in the textbox automatically once the text is entered in the first textbox.

I am not getting a way to achieve this..

please help me.

1 Answer 1

1

You need to handle the Leave Event of the first TextBox TextBox1.

Try This:

textBox1.Leave += new System.EventHandler(textBox1_Leave);
private void textBox1_Leave(object sender, EventArgs e)
{
      //Do calculations on TextBox1 value to display the result on TextBox2
}
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your reply.Again i need to update other textbox value in the same row . how to achieve that ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.