
Since I have a huge org chart and I have to use the WCF service for on-demand loading, but I see the drilldown don't work since it cannot get the NodeID.
The error as follow: Object reference not set to an instance of an object.
[NullReferenceException: Object reference not set to an instance of an object.]
Telerik.Web.UI.OrgChartNodeCollection.AssignReferencesToInnerTree(OrgChartNodeCollection nodes, RadOrgChart orgChart) +137
Telerik.Web.UI.OrgChartNodeCollection.OnNodeAdded(OrgChartNode node) +95
Telerik.Web.UI.OrgChartNodeCollection.Add(OrgChartNode node) +80
Telerik.Web.UI.RadOrgChart.SetupDrillDown(Int32[] drilledNodeIndexes) +190
Telerik.Web.UI.RadOrgChart.ExecuteDrillDown() +101
Telerik.Web.UI.RadOrgChart.OnPreRender(EventArgs e) +246
System.Web.UI.Control.PreRenderRecursiveInternal() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974
I am using the RadScheduler control, inside the AdvancedEditTemplate there is a RadComboBox.
The RadComboBox is displaying a list of patients, they will search the list of people and if they can not find the person they need to add them. So they click the button next to it and a window will popup where they enter all the info. How do I refresh the RadComboBox with the newly added patient selected?
Thank you for your help.
<telerik:RadScheduler ID="rschVisits" runat="server" DataSourceID="sqlConnVisits" SelectedView="WeekView" DataKeyField="visit_id" DataSubjectField="subject" DataStartField="start_time" DataEndField="end_time" FirstDayOfWeek="Monday" Height="750px" Width="1000px" StartInsertingInAdvancedForm="True" CustomAttributeNames="practice_room_id,practice_id,patient_id,billing_note,last_name,first_name,room_name,visit_type_id,visit_status_id,visit_reason,elig_status" EnableCustomAttributeEditing="True" HoursPanelTimeFormat="htt" MinutesPerRow="15" ShowAllDayRow="False" > <AdvancedForm Modal="true" /> <Reminders Enabled="false" /> <AppointmentContextMenuSettings EnableDefault="true" /> <AppointmentTemplate> <B><%#Eval("last_name")%>, <%#Eval("first_name")%></B><br /> Room: <%#Eval("room_name")%> </AppointmentTemplate> <AdvancedEditTemplate> <div class="rsAdvancedEdit" style="position: relative"> <%-- Title bar. --%> <div class="rsAdvTitle"> <%-- The rsAdvInnerTitle element is used as a drag handle when the form is modal. --%> <h1 class="rsAdvInnerTitle"> Update Appointment</h1> <asp:LinkButton runat="server" ID="AdvancedEditCloseButton" CssClass="rsAdvEditClose" CommandName="Cancel" CausesValidation="false" ToolTip='close'> close </asp:LinkButton> </div> <div class="rsAdvContentWrapper"> <telerik:RadComboBox ID="rcbPatients" runat="server" Height="200" Width="200" SelectedValue='<%# Bind("patient_id") %>' DataSourceID="sqlConnPatients" DataValueField="patient_id" DataTextField="full_name" DropDownWidth="310" EmptyMessage="Choose Patient" HighlightTemplatedItems="true" EnableLoadOnDemand="true" Filter="Contains" > <HeaderTemplate> <table style="width: 275px" cellspacing="0" cellpadding="0"> <tr> <td style="width: 175px;"> Patient Name </td> <td style="width: 60px;"> DOB </td> <td style="width: 40px;"> </td> </tr> </table> </HeaderTemplate> <ItemTemplate> <table style="width: 275px" cellspacing="0" cellpadding="0"> <tr> <td style="width: 175px;"> <%#DataBinder.Eval(Container.DataItem, "last_name").ToString%>, <%#DataBinder.Eval(Container.DataItem, "first_name").ToString%> </td> <td style="width: 60px;"> <%#getDateFromYYYYMMDD(DataBinder.Eval(Container.DataItem, "dob").ToString)%> </td> <td style="width: 40px;"> </td> </tr> </table> </ItemTemplate> </telerik:RadComboBox> <asp:ImageButton id="ImageButton22" runat="server" Alt="Client Search" ImageUrl="~/img/binocs_icon.jpg" OnClientClick="return AddPatient();"></asp:ImageButton> <asp:Panel runat="server" ID="ButtonsPanel" CssClass="rsAdvancedSubmitArea"> <div class="rsAdvButtonWrapper"> <asp:LinkButton CommandName="Update" ValidationGroup="EditVisit" runat="server" ID="UpdateButton" CssClass="rsAdvEditSave"> <span>Save</span> </asp:LinkButton> <asp:LinkButton runat="server" ID="CancelButton" CssClass="rsAdvEditCancel" CommandName="Cancel" CausesValidation="false"> <span>Cancel</span> </asp:LinkButton> <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox=true ShowSummary=false HeaderText="Please enter the following." ValidationGroup="EditVisit" /> </div> </asp:Panel> </div> </div> </AdvancedEditTemplate> <AdvancedInsertTemplate> ..... </AdvancedInsertTemplate> <TimeSlotContextMenuSettings EnableDefault="true" /> <AppointmentContextMenuSettings EnableDefault="true" /> </telerik:RadScheduler>
<Scrolling AllowScroll="true" UseStaticHeaders="true" /><ClientEvents OnScroll="ScrollGrid" OnColumnResized="ColumnResized" OnColumnShown="ColumnShown" />var isInGridScrolling = false;function ScrollGrid(sender, args) {var scrollTop = args.get_scrollTop();isInGridScrolling = true;$telerik.getElementByClassName(document.body, "rsContentScrollArea").scrollTop = scrollTop; isInGridScrolling = false;}function contentPageLoad() { $addHandler($telerik.getElementByClassName(document.body, "rsContentScrollArea"), "scroll", function (e) { if (!isInGridScrolling) { var RadGrid1 = $find("<%= SPGrid.ClientID %>"); RadGrid1.GridDataDiv.scrollTop = e.target.scrollTop; } });