This is my .aspx page ::
onclick="btnCreate_Click" />
AutoPostBack="true" DataKeyNames="RequestId,RequestCompanyName,StepID"
CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt">
This is my .aspx.cs page ::
public partial class Home : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
BindData();
}
}
private void BindData()
{
gvRequests.DataSource = BusinessUtility.SelectCurrentRequestsForUser(Master.PageController.UserData.CompanyId);
gvRequests.DataBind();
}
public string GetStatus(int stepId)
{
if (stepId == 3)
return "Saved - Mapping to be verified";
if (stepId == 4)
return "Mapping Verified";
if (stepId == 5)
return "Directors Info Entered";
if (stepId == 10)
return "Completed";
else
return "Unknown";
}
}
}
I just need to check that if my bound field' status id is incomplete then user can not able to press Create New Button, otherwise User can.
Pls help as soon as pos.
Thanks in advance.
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Om prakash SinghPosted Jul 16, 2011, 12:37 AM
and in this loop check the status and set the button enable property true or false.
foreach(datagriditem di in gridview.rows)
{
if (di.cell[2].text!="Completed"){
flag=false;
break;
}
}
if(flag!=false) btnCreate.enable=true; else btnCreate.enable =false;
Otherwise, You can set the button enable proberty here
if (stepId == 10){
btncreate.enable=true
return "Completed";
}
Try this and revert