Finding a control in Grid View
-
I am using a grid view control with check box, i want to modify multiple rows by selecting the checkboxes. i have added few textboxes in the footer template and a button. i will select multiple rows and i will assign the values which is avaialable in the text boxes in the footer template. on button clik i am trying to find the text box control in the footer template. I am getting an error. on clik of button i am doing this string LSL = ((TextBox)gv.FindControl("txtAssLSL")).Text.ToString(); string USL = ((TextBox)gv.FindControl("txtAssUSL")).Text.ToString(); string GRR = ((TextBox)gv.FindControl("txtAssGrr")).Text.ToString(); string FLimit = ((TextBox)gv.FindControl("txtFLimit")).Text.ToString(); string VLimit = ((TextBox)gv.FindControl("txtAssVLimit")).Text.ToString(); can any one tell me how to find a control from the footer template? :) Thanks in Advance.
-
I am using a grid view control with check box, i want to modify multiple rows by selecting the checkboxes. i have added few textboxes in the footer template and a button. i will select multiple rows and i will assign the values which is avaialable in the text boxes in the footer template. on button clik i am trying to find the text box control in the footer template. I am getting an error. on clik of button i am doing this string LSL = ((TextBox)gv.FindControl("txtAssLSL")).Text.ToString(); string USL = ((TextBox)gv.FindControl("txtAssUSL")).Text.ToString(); string GRR = ((TextBox)gv.FindControl("txtAssGrr")).Text.ToString(); string FLimit = ((TextBox)gv.FindControl("txtFLimit")).Text.ToString(); string VLimit = ((TextBox)gv.FindControl("txtAssVLimit")).Text.ToString(); can any one tell me how to find a control from the footer template? :) Thanks in Advance.
Can you post here Error message whatever you have got ?
Parwej Ahamad g.parwez@gmail.com
-
I am using a grid view control with check box, i want to modify multiple rows by selecting the checkboxes. i have added few textboxes in the footer template and a button. i will select multiple rows and i will assign the values which is avaialable in the text boxes in the footer template. on button clik i am trying to find the text box control in the footer template. I am getting an error. on clik of button i am doing this string LSL = ((TextBox)gv.FindControl("txtAssLSL")).Text.ToString(); string USL = ((TextBox)gv.FindControl("txtAssUSL")).Text.ToString(); string GRR = ((TextBox)gv.FindControl("txtAssGrr")).Text.ToString(); string FLimit = ((TextBox)gv.FindControl("txtFLimit")).Text.ToString(); string VLimit = ((TextBox)gv.FindControl("txtAssVLimit")).Text.ToString(); can any one tell me how to find a control from the footer template? :) Thanks in Advance.
I got the solution string USL = ((TextBox)gvLimit.FooterRow.FindControl("txtAssUSL")).Text.ToString();
-
I got the solution string USL = ((TextBox)gvLimit.FooterRow.FindControl("txtAssUSL")).Text.ToString();
Reddy Prakash wrote:
string USL = ((TextBox)gvLimit.FooterRow.FindControl("txtAssUSL")).Text.ToString();
Hi, no need to convert into string again bcoz Textbox's Text property is returning string only. Just write below line
string USL = ((TextBox)gvLimit.FooterRow.FindControl("txtAssUSL")).Text
Thanks, Sun Rays To get something you must have to try once. My Articles