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. Add a Blank row in a datagrid without using dataset

Add a Blank row in a datagrid without using dataset

Scheduled Pinned Locked Moved ASP.NET
help
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.
  • H Offline
    H Offline
    Hemant Mane
    wrote on last edited by
    #1

    I want to insert blank row to datarid without using dataset on the specify itemindex of datagrid plzzz help me thanx in advance aj

    J 1 Reply Last reply
    0
    • H Hemant Mane

      I want to insert blank row to datarid without using dataset on the specify itemindex of datagrid plzzz help me thanx in advance aj

      J Offline
      J Offline
      JamesMa
      wrote on last edited by
      #2

      Try the following codes (assume that there has 2 columns id and name in your datagrip) Dim dt As DataTable = New DataTable Dim dr As DataRow ' Add the columns as defined in the datagrip dt.Columns.Add("id") dt.Columns.Add("name") dr = dt.NewRow ' Set the value in dr if necessary ' dr("id") = 1 ' dr("name") = "My Name" ' dt.Rows.Add(dr) Me.DataGrid1.DataSource = dt Me.DataGrid1.DataBind() (I'm new to asp.net also, there may have some other simple option.....)

      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