or
| public void ShowRadAlert(string p_msg, string p_title) |
| { |
| //RadAlert(msg, height, width, title) |
| ScriptManager.RegisterStartupScript(Page, typeof(Page), |
| "ShowAlert", |
| string.Format(@" |
| function _showAlert() {{Sys.Application.remove_load(_showAlert); |
| radalert('{0}', null, 100, '{1}');}}; |
| Sys.Application.add_load(_showAlert);", p_msg, p_title), true); |
| } |
The question I have is this: Is there anyway to set focus to a control on the calling page after the OK button is clicked on the RadAlert. For example, I have validation on the main page to check to see if the value in a textbox (tbEmployeeCount) is entered and if it isn't display the RadAlert and then set tbEmployeeCount.focus() so the user can enter a value.
Thanks -

| protected void radGridCompanies_PageSizeChanged(object source, Telerik.Web.UI.GridPageSizeChangedEventArgs e) |
| { |
| //_take = radGridCompanies.PageSize; |
| //Label1.Text = "ny:" + radGridCompanies.PageSize.ToString(); |
| //radGridCompanies.PageSize = e.NewPageSize; |
| //_skip = e.NewPageIndex * radGridCompanies.PageSize; |
| //radGridCompanies.PageSize = radGridCompanies.PageSize; |
| //_skip = 0; |
| radGridCompanies.CurrentPageIndex = 0; |
| //radGridCompanies.DataSource = null; |
| radGridCompanies.Rebind(); |
| } |

Hi All,
I have a RadGrid and a lable as shown below.
| <telerik:AjaxSetting AjaxControlID="grdOverdue"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="grdOverdue"/> |
| <telerik:AjaxUpdatedControl ControlID="lblError"/> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <asp:Label ID="lblError" runat="server" Text="" Visible="false" SkinID="Error"></asp:Label> |
| <telerik:RadGrid ID="grdOverdue" runat="server" |
| .... |
| <CommandItemTemplate> |
| <span style="float:left;margin-left:5px;"> |
| <asp:Label ID="lblJobCount" runat="server" Text=""></asp:Label> |
| </span> |
| <span style="float:right;margin-right:5px;"> |
| <asp:LinkButton ID="lbExportAll" runat="server" CommandName="ExportToExcel">Export All</asp:LinkButton> | |
| <asp:LinkButton ID="lbExportSelected" runat="server" CommandName="ExportSelectedToExcel"> Export Selected</asp:LinkButton> |
| </span> |
| </CommandItemTemplate> |
| .... |
| </telerik:RadGrid> |
| protected void grdOverdue_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) |
| { |
| if (e.CommandName == "ExportSelectedToExcel") |
| { |
| if (selectedJobs.Count == 0) |
| { |
| lblError.Visible = true; |
| lblError.Text = "Please select atleast one job to export."; |
| } |
| else{ |
| lblError.Visible = false; // this is not working. |
| } |
| } |
| } |