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. C#
  4. problem in adding rows to datagrid

problem in adding rows to datagrid

Scheduled Pinned Locked Moved C#
helpcsharpasp-netquestion
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.
  • M Offline
    M Offline
    myinstincts
    wrote on last edited by
    #1

    I am developing an asp.net web application.I want to add rows to data gridview.But Datagridview.Rows.Add() functionality is not there..It was working fine in my vb.net windows application.Can somebody help me to sort this out?

    D 1 Reply Last reply
    0
    • M myinstincts

      I am developing an asp.net web application.I want to add rows to data gridview.But Datagridview.Rows.Add() functionality is not there..It was working fine in my vb.net windows application.Can somebody help me to sort this out?

      D Offline
      D Offline
      DIPAK EMSYS
      wrote on last edited by
      #2

      u can try adding row to DataTable with which u r binding ur grid. like

      DataRow row = Datatable.NewRow();
      DataTable.Rows.Add(row);

      dipak

      D 1 Reply Last reply
      0
      • D DIPAK EMSYS

        u can try adding row to DataTable with which u r binding ur grid. like

        DataRow row = Datatable.NewRow();
        DataTable.Rows.Add(row);

        dipak

        D Offline
        D Offline
        DIPAK EMSYS
        wrote on last edited by
        #3

        //Add Default row to data table.
        blankRow = dataSet.Tables[Constants.CLASSES].NewRow();
        blankRow["ClassName"] = Constants.SELECT;
        blankRow["ClassID"] = 0;
        dataSet.Tables[Constants.CLASSES].Rows.Add(blankRow);

        dipak

        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