Hi,
Before Web Hosting
-----------------------------
We have developed 1 project Namely TNPDA.
In that We have gridview that grid has
Three buttons namely display/hide and cancel.
When I click display hide will show.sql table flag is update into d.
When I click hide means flag update into h then display will show snow.
When press cancel flag will update c.
In row command event
BLLSuggestion_Mast ObjApp = new BLLSuggestion_Mast();
if (e.CommandName == "Display")
ObjApp.UpdateTopic(Convert.ToInt16(e.CommandArgument), Session["FLG"].ToString());
else if (e.CommandName == "Hide")
ObjApp.UpdateTopic(Convert.ToInt16(e.CommandArgument), Session["FLG"].ToString());
else if (e.CommandName == "Deny")
ObjApp.UpdateTopic(Convert.ToInt16(e.CommandArgument), Session["FLG"].ToString());
BindTopics();
In row data bound event
------------------------
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button objDisplay = (Button)e.Row.FindControl("btnApprove");
Button objHide = (Button)e.Row.FindControl("btnHide");
Button objCancel = (Button)e.Row.FindControl("btnCancel");
if (dgTopics.DataKeys[e.Row.RowIndex].Values[1].ToString() == "A")
{
objDisplay.Visible = false;
objHide.Visible = true;
objCancel.Visible = true;
}
else if (dgTopics.DataKeys[e.Row.RowIndex].Values[1].ToString() == "H")
{
objDisplay.Visible = true;
objHide.Visible = false;
objCancel.Visible = true;
}
else if (dgTopics.DataKeys[e.Row.RowIndex].Values[1].ToString() == "C")
{
objDisplay.Visible = true;
objHide.Visible = false;
objCancel.Visible = false;
}
}
}
After Web Hosting
-----------------------------
All the process done properly before web hosting but after web hosted there.
When I press display button in the grid flag also changed into D but not shows the hide button.
Can any one help me?
Thanks and regards
Prabu T
Suthish NairPosted Apr 12, 2011, 7:14 AM
As you said when you click Hide the status got changed to "H".
But your If conditions in row data bound event not saying that.
Check the logic in row data bound event.
What is "A"?
Karthikeyan AnbarasanPosted Apr 11, 2011, 12:44 PM
prabu thiruPosted Apr 11, 2011, 3:39 AM
IS DIs create any problem?
Karthikeyan AnbarasanPosted Apr 11, 2011, 2:31 AM