Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Finding a control in Grid View

Finding a control in Grid View

Scheduled Pinned Locked Moved ASP.NET
csshelptutorialquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Reddy Prakash
    wrote on last edited by
    #1

    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.

    P R 2 Replies Last reply
    0
    • R Reddy Prakash

      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.

      P Offline
      P Offline
      Parwej Ahamad
      wrote on last edited by
      #2

      Can you post here Error message whatever you have got ?

      Parwej Ahamad g.parwez@gmail.com

      1 Reply Last reply
      0
      • R Reddy Prakash

        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.

        R Offline
        R Offline
        Reddy Prakash
        wrote on last edited by
        #3

        I got the solution string USL = ((TextBox)gvLimit.FooterRow.FindControl("txtAssUSL")).Text.ToString();

        S 1 Reply Last reply
        0
        • R Reddy Prakash

          I got the solution string USL = ((TextBox)gvLimit.FooterRow.FindControl("txtAssUSL")).Text.ToString();

          S Offline
          S Offline
          Sun Rays
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups