I am using asp:UpdateProgress control to show progress during a button click. I am using telerik controls to ajaxify the submit button. The code sample is below:
<telerik:RadAjaxPanel ID="RadAjaxPanel4" runat="server">
<div class="customButton">
<asp:LinkButton ID="lbtnSave"
OnClientClick="return Page_ClientValidate();"
runat="server" OnClick="lbtnSave_Click"
CausesValidation="true">
<img src="../admin/images/icons/16x16/save.png" />
Save
</asp:LinkButton>
<div class="customButton">
</telerik:RadAjaxPanel>
My issue:
When I surround the button with the telerik:RadAjaxPanel, I have to click on the button twice. If I remove the panel, the button submits in one click. Is this happening because of the OnClientClick or one of the other LinkButton attributes or because of the surrounding telerik:RadAjaxPanel? Please help.
EDIT 04 27 12 :: 03:08PM
I tried changing the LinkButton to Button - but still the same problem.
Removing the OnClientClick attribute did not help either.
protected void grdData_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridDataItem) { GridDataItem item = (GridDataItem)e.Item; HyperLink link = (HyperLink)item["Name"].Controls[0]; } }<telerik:RadGrid runat="server" Height="150" ID="grdData" EnableEmbeddedSkins="false" OnSelectedIndexChanged="grdData_SelectedIndexChange" OnPreRender="grdData_PreRender"Skin="AS_Grid_Skin_V10" AutoGenerateColumns="False" AllowPaging="False" AllowSorting="True" Width="100%" OnItemDataBound="grdData_ItemDataBound"> <ClientSettings EnablePostBackOnRowClick="true"> <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="false" /> <Selecting AllowRowSelect="true" /> </ClientSettings> <MasterTableView DataKeyNames="ID"> <Columns> <telerik:GridHyperLinkColumn HeaderText="<%$ Resources:GlobalTerms, lblName%>" DataTextField="Name" HeaderStyle-Wid
th="25%" DataNavigateUrlFields="Id" DataNavigateUrlFormatString="javascript:openScenarioDashboard('{0}');" UniqueName="Name" SortExpression="Name"/>I hide the default ExpandCollapseColumn and create my own custom column using GridExpandColumn. My customed column is called "btnExpandColumn".
I use following code to hide/show my custom column, but for some reason, it doesn't allow me to change the tooltip text.
I assume to change the tooltip text, I just need to use:
col.ToolTip = "My custom text";
Is it correct?
protected void rgPatientList_PreRender(object sender, EventArgs e)
{
foreach (GridColumn col in rgPatientList.MasterTableView.RenderColumns)
{
if (col.UniqueName == "ExpandColumn")
{
col.Display = false;
}
}
foreach (GridDataItem dataItem in rgPatientList.Items)
{
GridImageButton btn = (GridImageButton)dataItem["btnExpandColumn"].Controls[0];
if (!dataItem.Expanded)
{
btn.Visible = true;
}
else if (dataItem.Expanded)
{
btn.Visible=false;
}
}
}