| protected void Lookup_ItemsRequested(object sender, RADHeaderTemplate.LookupBoxExpandedArgs e) |
| { |
| DataTable table; |
| RadComboBox combo; |
| DataRow row; |
| table = new DataTable(); |
| table.Columns.Add("Col1"); |
| table.Columns.Add("Col2"); |
| table.Columns.Add("Col3"); |
| row = table.NewRow(); |
| row.ItemArray = new string[] { "Row1Cell1", "Row1Cell2", "Row1Cell3" }; |
| table.Rows.Add(row); |
| row = table.NewRow(); |
| row.ItemArray = new string[] { "Row2Cell1", "Row2Cell2", "Row2Cell3" }; |
| table.Rows.Add(row); |
| combo = e.ComboBox; |
| combo.DataSource = table; |
| combo.DataBind(); |
| } |
I am using the RadTree in the ASP.NET AJAX Toolkit and have run into a problem. I cannot use the tri-state functionality for certain situations in my code and must use a custom JavaScript function to uncheck parent nodes when the child node is unselected. I found this snippet in the knowledge base. Unfortunately it does not work as promised.
When I run this code it unchecks the parent node but also unchecks all of the current nodes siblings. I put an alert function in the while loop and found that it returns a message that says “I am unchecking undefined”. What am I missing? Thank you.
function clientNodeChecked(sender, eventArgs)
{
var node = eventArgs.get_node();
alert("I am unchecking " + node.Text);
if (!node.get_checked())
{
while (node.get_parent().set_checked != null)
{
node.get_parent().set_checked(false);
node = node.get_parent();
alert("I am unchecking " + node.Text);
}
}
}
| RadGrid1.DataSource = from x in OtogramContext.ObjectScope().Extent<Otogram>() |
| select new |
| { |
| Patient = x.patient.name, |
| Physician = x.physicianName, |
| HearingLoss = x.AMAHearingScore, |
| Clinic = x.clinicName, |
| Customer = x.customerID |
| }; |
| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="ResQ.Contact.Test" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" > |
| <head runat="server"> |
| <link rel="Stylesheet" type="text/css" href="~/Skins/Dock.css" /> |
| <link rel="Stylesheet" type="text/css" href="~/Skins/Editor.css" /> |
| <link rel="Stylesheet" type="text/css" href="~/Skins/Spell.css" /> |
| <link rel="Stylesheet" type="text/css" href="~/Skins/ToolBar.css" /> |
| <link rel="Stylesheet" type="text/css" href="~/Skins/Widgets.css" /> |
| <link rel="Stylesheet" type="text/css" href="~/Skins/Window.css" /> |
| <link rel="Stylesheet" type="text/css" href="~/Skins/Office2007/Dock.Office2007.css" /> |
| <link rel="Stylesheet" type="text/css" href="~/Skins/Office2007/Editor.Office2007.css" /> |
| <link rel="Stylesheet" type="text/css" href="~/Skins/Office2007/Spell.Office2007.css" /> |
| <link rel="Stylesheet" type="text/css" href="~/Skins/Office2007/ToolBar.Office2007.css" /> |
| <link rel="Stylesheet" type="text/css" href="~/Skins/Office2007/Widgets.Office2007.css" /> |
| <link rel="Stylesheet" type="text/css" href="~/Skins/Office2007/Window.Office2007.css" /> |
| <title>Untitled Page</title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> |
| <div style="margin: 3px 3px 3px 3px;"> |
| <telerik:RadEditor ID="editor" runat="server" |
| Skin="Office2007" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false" |
| AutoResizeHeight="true" Height="55px" Width="800px" |
| ToolbarMode="Default" EnableResize="false" EditModes="Design"> |
| <Modules> |
| <telerik:EditorModule Name="RadEditorStatistics" Enabled="true" Visible="true" /> |
| </Modules> |
| <Tools> |
| <telerik:EditorToolGroup Enabled="true" DockingZone="Right"> |
| <telerik:EditorTool Name="AjaxSpellCheck" /> |
| </telerik:EditorToolGroup> |
| </Tools> |
| </telerik:RadEditor> |
| </div> |
| </form> |
| </body> |
| </html> |