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. datagrid update command

datagrid update command

Scheduled Pinned Locked Moved C#
csharpasp-netdatabasevisual-studiodesign
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.
  • S Offline
    S Offline
    srinivassam
    wrote on last edited by
    #1

    hello i want edit row in datagrid so after clicking edit button update and cancel linkbuttons is coming what i want is after clicking update linkbutton data is not updating . iam using vs.net2003 and asp.net 1.1 iam sending code please see and give me idea

    private void DataGrid1_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
    {
    String connection = "uid=sa; password=sa123; database=usermanagement; server=c113";
    SqlConnection con= new SqlConnection (connection);
    //SqlCommand cmd=new SqlCommand ("select * from tbl_user_management
    SqlDataAdapter da=new SqlDataAdapter ("select * from tbl_user_management",con);
    con.Open ();
    DataSet ds=new DataSet ();
    da .Update(ds);
    DataGrid1.EditItemIndex = -1;
    DataGrid1.DataBind ();

    	}
    

    srinivas sri

    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