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. General Programming
  3. C#
  4. How to assign Gridview cell value to a lable on "delete command"..?

How to assign Gridview cell value to a lable on "delete command"..?

Scheduled Pinned Locked Moved C#
salestutorialquestion
2 Posts 2 Posters 1 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
    sacr83
    wrote on last edited by
    #1

    hi, I wanna get cell value from my gridview.Ex- I have a column name called "CustName" in my gridview.It has a delete command aslo.After click on "delete" button I have to delete that particular customer from gridview.Before delete that customer i wanna assign that customers name to a "lable".Finally i wanna know how to assign that customer name to that lable. protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e) { // Code i need } Thankxxxx

    CheeN

    P 1 Reply Last reply
    0
    • S sacr83

      hi, I wanna get cell value from my gridview.Ex- I have a column name called "CustName" in my gridview.It has a delete command aslo.After click on "delete" button I have to delete that particular customer from gridview.Before delete that customer i wanna assign that customers name to a "lable".Finally i wanna know how to assign that customer name to that lable. protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e) { // Code i need } Thankxxxx

      CheeN

      P Offline
      P Offline
      paas
      wrote on last edited by
      #2

      This might work for you... label.Text = GridView2.CurrentRow.Cells["CustName"].Value.ToString();

      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