or
function openWin() { var docId = document.getElementById('cpEditor_hdnDocId').value; var oWnd = $find("<%= radPropertyInspector.ClientID %>"); oWnd.setUrl("NZFPropertyInspector.aspx?docId=" + docId); oWnd.show(); }<tel:RadGrid runat="server" ID="rgCounties" OnItemCommand="rgCounties_ItemCommand" AutoGenerateColumns="False" OnItemDataBound="rgCountes_ItemDataBound" AllowMultiRowEdit="True" CellSpacing="0" GridLines="None"> <MasterTableView> <Columns> <tel:GridBoundColumn Display="false" DataField="ID" UniqueName="SectionCountyID" /> <tel:GridTemplateColumn HeaderText="County" UniqueName="CountyColumn"> <InsertItemTemplate> <tel:RadComboBox runat="server" ID="rgrcCounty" DataTextField="CountyName" DataValueField="ID" /> </InsertItemTemplate> <ItemTemplate> <tel:RadComboBox runat="server" ID="rgrcCounty" DataTextField="CountyName" DataValueField="ID" /> </ItemTemplate> </tel:GridTemplateColumn> </Columns> </MasterTableView></tel:RadGrid> protected void rgCountes_ItemDataBound(object sender, GridItemEventArgs e){ if (e.Item is GridDataItem) { var ditem = e.Item as GridDataItem; var combo = ((RadComboBox)ditem["CountyColumn"].FindControl("rgrcCounty")); var sectionCountyID = int.Parse(ditem["SectionCountyID"].Text); var sectionCounty = Model.SectionCounties.Where(sc => sc.ID == sectionCountyID).FirstOrDefault(); combo.Bind(Model.Counties, false); if (sectionCounty != null) { combo.AddOrSelectByValue(sectionCounty.CountyID.ToString(), sectionCounty.County.CountyName); rnt.Text = sectionCounty.Percentage.ToString(); } } }
public static bool AddOrSelectByValue(this RadComboBox combo, string value, string text)
{
bool tf = combo.SelectByValue(value);
if (!tf)
{
combo.Items.Add(new RadComboBoxItem(text, value));
combo.SelectByValue(value);
}
return tf;
}
Since the most useful part of RadAjaxManager is the UI for defining AjaxSettings that go along with it, why not create something similar to ScriptManager and ScriptManagerProxy? This way, individual controls could have a ScriptManagerProxy, where they can define their own internal settings and update controls and then the content page (or master page) could have the top level RadAjaxManager that would aggregate all the RadAjaxManagerProxy controls from all child controls and content pages.
Thoughts?
function OnClientAppointmentMoveEnd(sender, eventArgs) { var apt = eventArgs.get_appointment(); var msg = ""; var novadata = eventArgs.get_newStartTime(); if (apt.get_start() != novadata) { msg = "New Schedule:" + novadata.format("HH:MM") + "\r\n"; } if (apt.get_timeSlot().get_resource(0).get_key() != eventArgs.get_targetSlot().get_resource(0).get_key()) { msg = msg + "New therapist:" + eventArgs.get_targetSlot().get_resource(0).get_text() + "\r\n"; } if (confirm(msg + "Confirm change?" )) { } else { set_cancel(true); } }