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. Help in JQuery for looping in a gridview

Help in JQuery for looping in a gridview

Scheduled Pinned Locked Moved Web Development
csharpjavascripthtmlcssasp-net
2 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.
  • W Offline
    W Offline
    www Developerof NET
    wrote on last edited by
    #1

    Hi all, I am using ASP.NET 2.0.I have a gridview which has 5-6 columns and two template columns, one containing a dropdownlist and other containing a textbox.The grid also contains three columns viz Itemcode, BatchNo and LOtNo, all three combine to form the primary key of the table.Now on a button click which is outside the grid ,i need to check that the Sum of all the distinct items irrespective of batch, lot be same Actually I have two problems: 1.I used the following code for looping through the grid:

    $('#Item_Details tr').each(function() {
    if (!this.rowIndex) return;
    var packsize = $(this).find("td").eq(3).html();
    var ddl_id=$(this).find(':input[type=select]').attr('id');
    var textid_id=$(this).find(':input[type=text]').attr('id');

    here i am able to get the textbox id but ddl id always returns undefined !!!! 2. Whats the best method with which i can group the items and find the sum using jQuery??? Any help would be appreciated....

    When you fail to plan, you are planning to fail.

    A 1 Reply Last reply
    0
    • W www Developerof NET

      Hi all, I am using ASP.NET 2.0.I have a gridview which has 5-6 columns and two template columns, one containing a dropdownlist and other containing a textbox.The grid also contains three columns viz Itemcode, BatchNo and LOtNo, all three combine to form the primary key of the table.Now on a button click which is outside the grid ,i need to check that the Sum of all the distinct items irrespective of batch, lot be same Actually I have two problems: 1.I used the following code for looping through the grid:

      $('#Item_Details tr').each(function() {
      if (!this.rowIndex) return;
      var packsize = $(this).find("td").eq(3).html();
      var ddl_id=$(this).find(':input[type=select]').attr('id');
      var textid_id=$(this).find(':input[type=text]').attr('id');

      here i am able to get the textbox id but ddl id always returns undefined !!!! 2. Whats the best method with which i can group the items and find the sum using jQuery??? Any help would be appreciated....

      When you fail to plan, you are planning to fail.

      A Offline
      A Offline
      ajian dong
      wrote on last edited by
      #2

      var ddl_id = $(this).find(':input[type=select]').attr('id'); You used an error selector. Ex: var ddl_id = $(this).find('select').attr('id');

      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