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. Dynamic item template

Dynamic item template

Scheduled Pinned Locked Moved ASP.NET
javascripthelp
4 Posts 2 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.
  • S Offline
    S Offline
    sekannak
    wrote on last edited by
    #1

    Hi, I cteated dynamic item templated in gridviw. I wat to validate from javascript . like Col1 - col2 - Col3 50 - 60 - 40 Here i want to validate the col2 shold not leads Col1 if it so i shold produce pop up from client side... Can any one help me... regards sekannak

    kannak

    D 1 Reply Last reply
    0
    • S sekannak

      Hi, I cteated dynamic item templated in gridviw. I wat to validate from javascript . like Col1 - col2 - Col3 50 - 60 - 40 Here i want to validate the col2 shold not leads Col1 if it so i shold produce pop up from client side... Can any one help me... regards sekannak

      kannak

      D Offline
      D Offline
      Dinesh Mani
      wrote on last edited by
      #2

      Place the data in data controls within columns and place compare validators to validate the data between the two controls. Use an error summary control and set the prompt type as message box.

      S 1 Reply Last reply
      0
      • D Dinesh Mani

        Place the data in data controls within columns and place compare validators to validate the data between the two controls. Use an error summary control and set the prompt type as message box.

        S Offline
        S Offline
        sekannak
        wrote on last edited by
        #3

        Hi, Before start doing your logic. Can u give idea of my logic please. Actually the grid contains two/more rows and 3/more coloumns which is dependes upon the selection changes from the Dropdownlist control. Second one is User can enter value on the text box controls of grid view , which all textbox are dynamically created item template not static item template. Problem: I want to validate Second & Third text box should always less then the First Text box. I was trying to take the Textbox id then i compared the current values less the the first textbox values or not? like such a way from Javascript , ctl00_ctl00_ctl01_ContentPlaceHolder1_grdSal_ctl02_txt0 so this is the id of the text box but i cannot find the values of the text box on the Onblur Event. Is the any other event to find out the text box values except Onblur,onkeypress... can u plz ...

        kannak

        D 1 Reply Last reply
        0
        • S sekannak

          Hi, Before start doing your logic. Can u give idea of my logic please. Actually the grid contains two/more rows and 3/more coloumns which is dependes upon the selection changes from the Dropdownlist control. Second one is User can enter value on the text box controls of grid view , which all textbox are dynamically created item template not static item template. Problem: I want to validate Second & Third text box should always less then the First Text box. I was trying to take the Textbox id then i compared the current values less the the first textbox values or not? like such a way from Javascript , ctl00_ctl00_ctl01_ContentPlaceHolder1_grdSal_ctl02_txt0 so this is the id of the text box but i cannot find the values of the text box on the Onblur Event. Is the any other event to find out the text box values except Onblur,onkeypress... can u plz ...

          kannak

          D Offline
          D Offline
          Dinesh Mani
          wrote on last edited by
          #4

          I'm not sure if I got your requirement right, so I'm rephrasing it here - * You have a datagrid with item template * The controls in the item template are not defined in the design time? - I don't see why you would need to dynamically add items to your item template. Even if it is needed, just place it in at design time and hide it on the server runtime. Confirm how you are placing the controls on the item template. * The values that you wish to check are loaded based on some user selection? - All 3 values are loaded or does the user enter any values? confirm * You wish to validate that textbox1's value is always more than textbox2 and textbox3's value. All that you need to do is put a compare validator along with textbox2 and textbox3 and validate the value against textbox1 using the control to validate and control to compare properties.

          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