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. Does AJAX can get ColumnName at client?

Does AJAX can get ColumnName at client?

Scheduled Pinned Locked Moved ASP.NET
databasehelpquestion
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.
  • O Offline
    O Offline
    Old Gun
    wrote on last edited by
    #1

    I want to get DataTable value by column index,not by specical column name,So I must get column name,I test many way to get it,it is always failed.this is my code. 1. alert(ds.Tables[0].Columns[0].Name); 2. alert(ds.Tables[0].Columns[0].Item[0]); 3. alert(ds.Tables[0].Columns[0].FieldName); 4. alert(ds.Tables[0].Columns[0].ColumnName); Can you help me?

    E 1 Reply Last reply
    0
    • O Old Gun

      I want to get DataTable value by column index,not by specical column name,So I must get column name,I test many way to get it,it is always failed.this is my code. 1. alert(ds.Tables[0].Columns[0].Name); 2. alert(ds.Tables[0].Columns[0].Item[0]); 3. alert(ds.Tables[0].Columns[0].FieldName); 4. alert(ds.Tables[0].Columns[0].ColumnName); Can you help me?

      E Offline
      E Offline
      Edbert P
      wrote on last edited by
      #2

      What was the error returned? ds.Tables[0].Columns[0].ColumnName should work unless your dataset is null or contains no tables, or the table has no columns at all. BTW, why are you using alert? If you mean to access the dataset from Javascript, you need to convert the dataset into either an XML or Javascript array first. "You are special, but so is everybody else." "Democracy is two wolves and a sheep voting on what to have for dinner" - Ross Edbert Sydney, Australia

      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