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. javascript function to check value present in gridview or not

javascript function to check value present in gridview or not

Scheduled Pinned Locked Moved ASP.NET
javascripthelplearning
1 Posts 1 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.
  • L Offline
    L Offline
    Learning IT
    wrote on last edited by
    #1

    i am using js function to check gridview value existence it was working fine for single page it doesnt check the whole records it only checks those records which are on current page, function checkval() { var txt=document.getElementById("<%= txt_category.ClientID %>").value; var theGridView = document.getElementById("<%= gv_faculty_category.ClientID %>"); if(theGridView!=null && txt!="") { for ( var rowCount = 1; rowCount < theGridView.rows.length; rowCount++ ) { alert(theGridView.rows.length); if ( theGridView.rows(rowCount).cells(0).children(0)!=null) { // Find Check Box control in gridview var theGridViewLable = theGridView.rows(rowCount).cells(1).children(0); if(theGridViewLable.innerHTML==txt) { document.getElementById("<%=lbl_proceed.ClientID %>").innerHTML="Category Exists"; document.getElementById("<%=hf.ClientID %>").setAttribute("value","no"); break; } else { document.getElementById("<%=lbl_proceed.ClientID %>").innerHTML="Proceed"; document.getElementById("<%=hf.ClientID %>").setAttribute("value", "Proceed"); } } } } else { document.getElementById("<%=lbl_proceed.ClientID %>").innerHTML=""; document.getElementById("<%=hf.ClientID %>").setAttribute("value", "Proceed"); } } can u plz help me thanks in advance

    learning developer

    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