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. How to Iterate the specific DataGrid column and save in Database,.

How to Iterate the specific DataGrid column and save in Database,.

Scheduled Pinned Locked Moved ASP.NET
databasehelptutorial
3 Posts 3 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.
  • J Offline
    J Offline
    jebin k
    wrote on last edited by
    #1

    Hi, I have a datagrid with 13 columns(like event, venue etc),The column names are defined in list box. The values selected in the list box should only be saved in database table. Can any one help me how to iterate the specific columns only. Thanks in Advance.:)

    B J 2 Replies Last reply
    0
    • J jebin k

      Hi, I have a datagrid with 13 columns(like event, venue etc),The column names are defined in list box. The values selected in the list box should only be saved in database table. Can any one help me how to iterate the specific columns only. Thanks in Advance.:)

      B Offline
      B Offline
      Basheer mohideen
      wrote on last edited by
      #2

      For Each dbGridItem As DataGridItem In Me.dgGrid.Items dim sTemp as strin sTemp = dbGridItem.Cells(1).Text.Trim.ToString 'Column index where u stored events,venus.. select case Ucase(sTemp) case "EVENTS" 'do the process case "VENUS" 'do the process end select Exit For Next the above is the code you can use to iterate thru data grid

      Bash-Tsh

      1 Reply Last reply
      0
      • J jebin k

        Hi, I have a datagrid with 13 columns(like event, venue etc),The column names are defined in list box. The values selected in the list box should only be saved in database table. Can any one help me how to iterate the specific columns only. Thanks in Advance.:)

        J Offline
        J Offline
        John ph
        wrote on last edited by
        #3

        you can write something like this to iterate through the items of DataGrid

        Dim Griditem As DataGridItem
        For Each GridItem In Datagrid.Items
          value = GridItem.cells(ColumnIndex).Text
        Next
        

        Regards
         - J O N -


        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