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. General Programming
  3. Visual Basic
  4. Datagrid using VB.NET (web vs. windows)

Datagrid using VB.NET (web vs. windows)

Scheduled Pinned Locked Moved Visual Basic
csharpvisual-studiohelptutorial
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.
  • H Offline
    H Offline
    holdesb
    wrote on last edited by
    #1

    I am writing a WINDOWS form with a datagrid where i need to run a loop and basically flag every item (containers to be shipped in this case). Now, I've done this with a webform and have had no problems what so ever with it but when it comes to a Windows Form the controls are differnt i.e., namespaces I can't perform the same functions. Here is the sample code from a web form and I was wondering if anyone had any idea how to approach this from a windows form? Any help would be greatly appreciated. Thanks! 'Insert Shipping Request Information into tblContainer - manifestDocument & shipingRequestID Dim myDataGridItem As DataGridItem Dim strContainerID As String lblStatus.Text = "
    You selected the Following containers to be shipped:

    " 'Look at notes: Put the update clause back in at lblStatus.Text to update those records as they cycle through the Loop For Each myDataGridItem In dgContainer.Items strContainerID = CType(myDataGridItem.FindControl("lblContainerID"), Label).Text With cmdUpdateContainer .Parameters("@containerID").Value = strContainerID .Parameters("@containerShippingRequest").Value = fldID.Text .Parameters("@containerUpdateDate").Value = Today .Parameters("@containerDateShip").Value = fldDate.Text .Parameters("@storageType").Value = "PEN" .Parameters("@wasteStream").Value = ddlWasteStream.SelectedItem.Text End With SqlConnection2.Open() cmdUpdateContainer.ExecuteNonQuery() SqlConnection2.Close() End If Next:confused:

    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