Click here to Skip to main content
15,923,557 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionDisable Status Bar Pin
padmanabhan N27-Sep-10 2:52
padmanabhan N27-Sep-10 2:52 
AnswerRe: Disable Status Bar Pin
NeverHeardOfMe27-Sep-10 3:13
NeverHeardOfMe27-Sep-10 3:13 
AnswerRe: Disable Status Bar Pin
Not Active27-Sep-10 4:27
mentorNot Active27-Sep-10 4:27 
GeneralRe: Disable Status Bar [modified] Pin
NeverHeardOfMe27-Sep-10 4:33
NeverHeardOfMe27-Sep-10 4:33 
GeneralRe: Disable Status Bar Pin
5fingers27-Sep-10 22:00
5fingers27-Sep-10 22:00 
GeneralRe: Disable Status Bar Pin
Not Active28-Sep-10 6:23
mentorNot Active28-Sep-10 6:23 
AnswerRe: Disable Status Bar Pin
T M Gray28-Sep-10 4:41
T M Gray28-Sep-10 4:41 
QuestionChange the Status in Gridview column Pin
Krishhhhhhhhhhhhhh27-Sep-10 2:33
Krishhhhhhhhhhhhhh27-Sep-10 2:33 
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

<asp:gridview id="GrdViewM" runat="server" autogeneratecolumns="False">
<columns>
<asp:templatefield> <itemtemplate> <asp:checkbox id="ChkBoxView" runat="server">


<itemtemplate> <asp:boundfield headertext="Name" datafield="Name">
<asp:templatefield headertext="Status"> <itemtemplate>
<asp:label id="Label1" runat="server" text="<%# Bind("Status") %>">




<asp:linkbutton id="LnkBtnStart" runat="server" onclick="LnkBtnStart_Click">
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)
{
Stat();
System.Threading.Thread.Sleep(3000);


ArrayList arr = FindVM();

if (arr.Count > 0)
{
string Name = string.Empty;
foreach (string[] s in arr)
{

VMName = s[1].ToString();
int rid = Convert.ToInt32(s[0]);

GrdViewM.Rows[i].Cells[1].Text = "Running";
}}}

public void stat()
{
ArrayList arr = FindVM();
if (arr.Count > 0)
{
string VMName = string.Empty;
foreach (string[] s in arr)
{ VMName = s[1].ToString();
int rid = Convert.ToInt32(s[0]);

GrdViewM.Rows[i].Cells[1].Text = "Starting.....";
}
}}

Please Help Me
QuestionShow Reminder Window Pin
vishnukamath27-Sep-10 0:42
vishnukamath27-Sep-10 0:42 
AnswerRe: Show Reminder Window Pin
Not Active27-Sep-10 2:34
mentorNot Active27-Sep-10 2:34 
GeneralRe: Show Reminder Window Pin
vishnukamath27-Sep-10 19:06
vishnukamath27-Sep-10 19:06 
GeneralRe: Show Reminder Window Pin
Not Active28-Sep-10 1:22
mentorNot Active28-Sep-10 1:22 
AnswerRe: Show Reminder Window Pin
5fingers27-Sep-10 22:02
5fingers27-Sep-10 22:02 
GeneralRe: Show Reminder Window Pin
vishnukamath27-Sep-10 23:55
vishnukamath27-Sep-10 23:55 
AnswerRe: Show Reminder Window Pin
Karthik. A28-Sep-10 6:21
Karthik. A28-Sep-10 6:21 
GeneralRe: Show Reminder Window Pin
vishnukamath28-Sep-10 19:03
vishnukamath28-Sep-10 19:03 
GeneralRe: Show Reminder Window Pin
Karthik. A29-Sep-10 10:53
Karthik. A29-Sep-10 10:53 
Questionlogin.aspx Pin
Ajay Kale New27-Sep-10 0:10
Ajay Kale New27-Sep-10 0:10 
AnswerRepeat and spam Pin
Not Active27-Sep-10 2:29
mentorNot Active27-Sep-10 2:29 
GeneralRe: Repeat and spam Pin
Ajay Kale New27-Sep-10 2:35
Ajay Kale New27-Sep-10 2:35 
GeneralRe: Repeat and spam Pin
5fingers28-Sep-10 1:15
5fingers28-Sep-10 1:15 
GeneralRe: Repeat and spam Pin
Ajay Kale New28-Sep-10 1:22
Ajay Kale New28-Sep-10 1:22 
Questionsending parameter to webmethod - autocomplete extender Pin
rajkumar.326-Sep-10 21:12
rajkumar.326-Sep-10 21:12 
Questionsession fixation Pin
padmanabhan N26-Sep-10 21:06
padmanabhan N26-Sep-10 21:06 
QuestionPage.RegisterStartupScript Pin
Member 387988126-Sep-10 19:33
Member 387988126-Sep-10 19:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.