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. Change the Status in Gridview column

Change the Status in Gridview column

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

    Hi, I have a gridview and a button-Start in aspx page. In gridview 3 columns checkbox , Name and Status. Select multiple columns and click on Start then Status column for selected rows should be changed to "Starting...", later it should be changed to "Started". But it is showing directly "Started". In the mean time i should see "Starting..." also. Here is my code Aspx page Start .cs File protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GridData(); } } public void GridData() { DataTable dt = new DataTable(); dt.Columns.Add("VMName"); dt.Columns.Add("Status"); dt.Rows.Add("abc", "Stopped); dt.Rows.Add("xyx", "Running); dt.Rows.Add("xyz", "Stopped); GrdViewM.DataSource = dt; GrdViewM.DataBind(); } public ArrayList FindChk() { ArrayList arr = new ArrayList(); if (GrdViewM.Rows.Count > 0) { for (int i = 0; i < GrdViewM.Rows.Count; i++) { //finding checkbox in GridView CheckBox cbx = (CheckBox)GrdViewM.Rows[i].FindControl("ChkBoxView"); //CheckBox not null if (cbx != null) { //if CheckBox Checked if (cbx.Checked) { arr.Add(new string[] { i.ToString(), GrdViewM.Rows[i].Cells[1].Text}); } } } } return arr; } protected void LnkBtnStart_Click(object sender, EventArgs e

    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