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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. problem in updating the gridview in asp.net 2005 with c# language

problem in updating the gridview in asp.net 2005 with c# language

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netdatabaseannouncement
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.
  • P Offline
    P Offline
    priyamsc
    wrote on last edited by
    #1

    hi, i have used gridview in asp.net 2005 wit c#.i need to update my datas.in tat i hv placed dropdownlist,checkbox controls.but its not updating the datas.when i edit the row,we have dropdownlist but not tat database value.so when i edit the row the database value should be in dropdown list.when i click update link i got this error.The GridView 'GridView1' fired event RowUpdating which wasn't handled.so pls help me to do this. this is coding ----------------- protected void GridView1_RowUpdated(object sender, GridViewUpdatedEventArgs e) { GridViewRow gv = null; string k = string.Format(GridView1.Rows[gv.RowIndex].Cells[4].Text); Response.Write(k); TextBox t1, t2, t3, t4, t5,t6,t7,t8,t9,t10,t11; DropDownList d1, d2, d3, d4,d5; CheckBox cdr, cdrw, cdvdr, cdvdrw, cfdd, cinter, cwa; t1 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[5].Controls[1]; t2 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[6].Controls[1]; t3 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[7].Controls[1]; t4 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[8].Controls[1]; t5 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[9].Controls[1]; t6 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[10].Controls[1]; t7 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[11].Controls[1]; t8 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[18].Controls[1]; t9 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[20].Controls[1]; t10 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[21].Controls[1]; t11 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[22].Controls[1]; d1 = (DropDownList)GridView1.Rows[gv.RowIndex].Cells[0].Controls[0]; d2 = (DropDownList)GridView1.Rows[gv.RowIndex].Cells[1].Controls[0]; d3 = (DropDownList)GridView1.Rows[gv.RowIndex].Cells[2].Controls[0]; d4 = (DropDownList)GridView1.Rows[gv.RowIndex].Cells[3].Controls[0]; d5 = (DropDownList)GridView1.Rows[gv.RowIndex].Cells[23].Controls[0]; cdr = (CheckBox)GridView1.Rows[gv.RowIndex].Cells[12].Controls[2]; cdrw = (CheckBox)GridView1.Rows[gv.RowIndex].Cells[13].Controls[2]; cdvdr =(CheckBox)GridView1.Rows[gv.RowIndex].Cells[14].Controls[2]; cdvdrw=(CheckBox)GridView1.Rows[gv.RowIndex].Cells[15].Controls[2]; cfdd = (

    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