<telerik:RadComboBox runat="server" id="rcbSite" width="210px" enableloadondemand="true" onclientitemsrequesting="rcbSite_OnClientItemsRequesting" showmoreresultsbox="True" enablevirtualscrolling="True" > <WebServiceSettings Method="GetSitesComboBoxDataByCustomerId" Path="/Services/ClientSideDataService.asmx" /> </telerik:RadComboBox>function rcbSite_OnClientItemsRequesting(sender, eventArgs) { //Get the selected customer var selectedCustomerId = $('#<%= CustomerDropDownId %> option:selected').attr('value'); var context = eventArgs.get_context(); //Set filter text context["FilterString"] = eventArgs.get_text(); context["CustomerId"] = selectedCustomerId; }if (siteId.HasValue)
{ rcbSite.Items.Add(SiteManager.GetComboBoxItemBySiteId(siteId.Value)); rcbSite.SelectedValue = siteId.Value.ToString();
}Sys.Application.add_load(function(){ //If the combo box has items in it, select the first one //Selecting first item client side ensures that address fields are refreshed when binding individual item to combo box on initial page load var combo = $find("<%= rcbSite.ClientID %>"); if (combo.get_items().getItem(0)) { combo.trackChanges(); combo.get_items().getItem(0).select(); combo.commitChanges(); } $find("<%= rcbSite.ClientID %>").add_selectedIndexChanged( function (sender, eventArgs) { var item = eventArgs.get_item(); var addressFormFields = new InventoryAddressFields("<%= ddlAddressType.ClientID %>", "<%= txtAttenTo.ClientID %>", "<%= txtAddress1.ClientID %>", "<%= txtAddress2.ClientID %>", "<%= txtCity.ClientID %>", "<%= ddlCountry.ClientID %>", "<%= ddlState.ClientID %>", "<%= ddlCounty.ClientID %>", "<%= txtPostalCode.ClientID %>", "<%= txtPostalCodePlus4.ClientID %>", "<%= txtPhone.ClientID %>", "<%= txtFax.ClientID %>", "<%= ddlTimezone.ClientID %>", "<%= chkObserveDST.ClientID %>", "<%= ddlVerificationStatus.ClientID %>"); if (item) { var selectedSiteId = item.get_value(); GetAddressBySiteId(addressFormFields, selectedSiteId); } else { clearAddressFields(addressFormFields); } } ); });<ItemTemplate>
<img src="<%= ControlPath%>product.jpg" alt="<%# Eval("Name")%>" /> <div> <h2><%# Eval("Name")%></h2> <p><%# Eval("Description") %></p>
</div> <br class="clear" /> <telerik:RadCalendar ViewStateMode="Disabled" runat="server" TitleFormat="MMMM yyyy" AutoPostBack="true" PresentationType="Preview" EnableNavigation="true" EnableMonthYearFastNavigation="false" OnDayRender="Calendar_DayRender" OnDefaultViewChanged="Calendar_DefaultViewChanged" /></ItemTemplate><telerik:RadCalendar ID="radCalendar" runat="server" CultureInfo="ar-SA"> </telerik:RadCalendar>
Hi,
How to show a RadAlert on a modal RadWindow befor closing the radwindow.
Requirement Step:
1) Open a page (Say EmployeeList.aspx).
2) Open a radwindow as modal window using a button. Radwindow is navigating to other page (Say EditEmployee.aspx).
3) Modal window contails "Save" and "Cancel" button.
4) Once user edits the data and hit Save button - we need to show a radalert saying 'Data Saved Successfully' and the modal window needs to closed automatically.
Problem is: As I am closing the radwindow to refresh the parent page grid, radalert message is not getting displayed. Also I can't use asp.net alert coz normal alert will not allow me to change the alert (yellow) icon to information icon. Kindly help on this
Java script code on EditEmployee.aspx to close the modal window:
function CloseAndRebind(args) { radalert('Data Saved successfully', 330, 100, 'Client RadAlert', null); GetRadWindow().BrowserWindow.refreshGrid(args); GetRadWindow().close(); }function GetRadWindow() { var oWindow = null; if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well) return oWindow; }function CloseWindow() { GetRadWindow().close(); }<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="True"><Windows><telerik:RadWindow ID="IncidentListDialog" runat="server" Title="Incident" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true" Width="900px" Height="760px" Left="50px" Top="50px" ></telerik:RadWindow><telerik:RadWindow ID="IncidentActionsDialog" runat="server" Title="Actions" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true" Width="900px" Height="760px" Left="50px" Top="50px"></telerik:RadWindow></Windows>
</telerik:RadWindowManager>