Click here to Skip to main content
15,919,422 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,
I am writing C# windows application.In gridview, I want to set focus in textbox when I click the checkbox.If checkbox is checked,I want to set focus in textbox and fill data in gridview.Please,
help me for that.Thanks you all.
Posted
Comments
Pradeep Shukla 25-Sep-13 23:15pm    
I am little confused.. can you clearly state where the checkbox & textbox are.. inside the grid or out of grid?
Member 10297003 26-Sep-13 0:38am    
I mean textbox and checkbox are inside gridview.After DataGridViewCheckBox is checked, DataGridViewTextBox set focus and fill data.Thanks for your interesting to my question.Please help me.Thanks.
Member 10297003 26-Sep-13 0:37am    
I mean textbox and checkbox are inside gridview.After DataGridViewCheckBox is checked, DataGridViewTextBox set focus and fill data.Thanks for your interesting to my question.Please help me.Thanks.

1 solution

this code write in Checkbox Event handler 

C#
CheckBox CB = (CheckBox)sender;
GridViewRow row = CB.Parent;//or  CB.Parent.Parent;
TextBox TB = row.FindControl("TextBox Id Here");
TB.Text = "any thing";
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900