So here is the button code
<div class="row mb-3">
<div class="col-lg-6">
<div class="form-inline">
<telerik:RadButton ID="btnRunAudits" runat="server" SingleClick="true" OnClick="btnRunAudits_Click" CssClass="btn btn-info mr-3">
<ContentTemplate>
<i class="fal fa-long-arrow-right"></i>Execute System Edits
</ContentTemplate>
</telerik:RadButton>
<telerik:RadLabel ID="lblExecuteAuditHistory" runat="server" CssClass="time-stamp" Visible="false"></telerik:RadLabel>
</div>
</div>
<div class="col-lg-6 text-right">
<telerik:RadButton ID="btnExport" runat="server" OnClientClicking="btnExport_onClientClicking" OnClick="btnExport_Click" CssClass="btn btn-info">
<ContentTemplate>
<i class="fal fa-file-export"></i>Export Option(s)
</ContentTemplate>
</telerik:RadButton>
<telerik:RadButton ID="btnRefreshErrors" runat="server" OnClick="btnRefreshErrors_Click" CssClass="btn btn-refresh" SingleClick="true" Width="100">
<ContentTemplate>
<i class="far fa-sync"></i> Refresh
</ContentTemplate>
</telerik:RadButton>
</div>
</div>
Here is what normally works but does not:
protected void btnRunAudits_Click(object sender, EventArgs e)
{
// CLF - the button should be disabled if you can't click. But just in case!
if (util.Db.GetUBUserAssign(ubid) == util.appUserId && IsValidEdit(util.Db.GetUBStatusByUBID(ubid).ToString()))
{
btnExport.Enabled = false; <==========
btnRefreshErrors.Enabled = false; <=========
//util.Db.RunUBAuditsBC(ubid);
BuildExceptionGrid();
if (gItemizedParsing.Items.Count > 0)
{
plcTraining.Visible = true;
}
else
{
Session["UBAuditOpen" + ubid.ToString()] = "T";
Response.Redirect("~/ubEditor.aspx?SysID=" + ubid.ToString(), false);
}
//add entry into audit history table
util.Db.SaveLastExecuteInfo(ubid, util.appUserId);
lbItemsRemaining.Text = util.Db.GetPotentialItemsRemaining(ubid);
DataTable dt = util.Db.GetLastExecuteInfo(ubid);
if (dt.Rows.Count > 0)
{
lblExecuteAuditHistory.Visible = true;
lblExecuteAuditHistory.Text = "Last Executed by " + dt.Rows[0]["displayNm"].ToString() + " at " + dt.Rows[0]["dateup"].ToString();
}
btnExport.Visible = true;
btnRefreshErrors.Visible = true;
}
else
{
btnRunAudits.Enabled = false;
}
}
I have verified it is hitting the code above noted with <========
Basically when they press the btnRunAudits button i want btnExport and btnRefreshErrors disabled until btnRunAudits is done.
HELP :)