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. Passing a value [modified]

Passing a value [modified]

Scheduled Pinned Locked Moved ASP.NET
question
3 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.
  • D Offline
    D Offline
    Dayekh
    wrote on last edited by
    #1

    Hi, I have an value bound to a column in a datagrid. I need to pass that value to a function. I thought this would easy for me. I used something like: Dim e As DataGridItem ds = obj.getDetails(e.Cells(0).Text) This would mean that it is trying to extract as a string OR convert the contents of the cell to string. I need the value to be extracted as an integer. Char to Integer conversions cannot happen. Please advise me if you can. Is there a straighforward way to extract the value of that cell?? Thank you. -- modified at 9:52 Wednesday 10th January, 2007

    G 1 Reply Last reply
    0
    • D Dayekh

      Hi, I have an value bound to a column in a datagrid. I need to pass that value to a function. I thought this would easy for me. I used something like: Dim e As DataGridItem ds = obj.getDetails(e.Cells(0).Text) This would mean that it is trying to extract as a string OR convert the contents of the cell to string. I need the value to be extracted as an integer. Char to Integer conversions cannot happen. Please advise me if you can. Is there a straighforward way to extract the value of that cell?? Thank you. -- modified at 9:52 Wednesday 10th January, 2007

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      The table cell contains a string value, not a number. If you want the value as a number, you have to parse the string. If the value in the table cell comes from a numeric field in the data source, you have to read the value from the data source instead of from the table cell to get it in the original numeric form. When the value is put in the table cell it's convertered into a string value.

      --- Year happy = new Year(2007);

      D 1 Reply Last reply
      0
      • G Guffa

        The table cell contains a string value, not a number. If you want the value as a number, you have to parse the string. If the value in the table cell comes from a numeric field in the data source, you have to read the value from the data source instead of from the table cell to get it in the original numeric form. When the value is put in the table cell it's convertered into a string value.

        --- Year happy = new Year(2007);

        D Offline
        D Offline
        Dayekh
        wrote on last edited by
        #3

        Thank you for the reply mate. Very useful info! :)

        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