Hello,
I am generating dynamically a template for a RadComboBox, trying to simulate the declarative sample given for treeview in combo, it works until the point where my client side script is never called when a node is selected.
Here is part of he template code where the OnClientNodeClicking value is set:
public class PageComboTemplate : ITemplate
{
public void InstantiateIn(Control container)
{
HtmlGenericControl div1 = new HtmlGenericControl("div");
div1.ID = "div1";
div1.Style.Add( HtmlTextWriterStyle.Display, "block");
RadTreeView RadTree1 = new RadTreeView();
RadTree1.ID = "RadTree1";
RadTree1.OnClientNodeClicking = "nodeClicking";
RadTree1.Skin = "Web20";
RadTree1.AllowNodeEditing = false;
RadTree1.EnableDragAndDrop = false;
RadTree1.EnableDragAndDropBetweenNodes = false;
RadTree1.MultipleSelect = false;
RadTree1.DataBinding += new EventHandler(RadTree1_DataBinding);
div1.Controls.Add(RadTree1);
container.Controls.Add(div1);
Trace2.WriteLineIf(ModuleTraceSwitch.Sw.TraceVerbose, string.Format("[V]FastAddPage PageComboTemplate InstantiateIn END container: {0}",container));
}
Then the script extirped from the sample, in my page declaratives:
...
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat=server />
<script type="text/javascript" language="javascript">
function nodeClicking(sender, args)
{
var comboBox = $find('RadComboBox1');
var node = args.get_node();
comboBox.set_text(node.get_text());
comboBox.hideDropDown();
}
function StopPropagation(e)
{
if(!e)
{
e = window.event;
}
e.cancelBubble = true;
}
</script>
<div id="centerdiv" style="margin-left:auto; margin-right:auto; width:100%">
<div id="combodiv" style="float:left; width:250px;" >
<telerik:RadComboBox ID="RadComboBox1" runat="server" Height="140px" Width="80%"
ShowToggleImage="True" Skin="Web20" style="vertical-align:middle;" >
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
<ExpandAnimation Type="OutQuart"></ExpandAnimation>
</telerik:RadComboBox>
<script type="text/javascript">
var div1 = document.getElementById("div1");
div1.onclick = StopPropagation;
</script>
</div>
...
Where ismy error ?
Do I need to use any ScriptControlBlock RadScriptBlock to have it persisted ?
Thanks for help.
CS
I needed to change a string in the Telerik.Web.UI.dll, so i recompiled the DLL. I translated the text "No records to display" in the radgrid to Dutch, so nothing big.
Compilation went ok, but when i copied the new dll into the bin-folder of my web application i got the following exception
System.InvalidOperationException:
Assembly 'Telerik.Web.UI, Version=2008.1.515.0, Culture=neutral,
PublicKeyToken=29ac1a93ec063d92' contains a Web resource with name
'Telerik.Web.UI.Ajax.Ajax.js', but does not contain an embedded
resource with name 'Telerik.Web.UI.Ajax.Ajax.js'.
Any clue what i can do about this? Thanks in advance!
this is my menu declaration.
<
telerik:RadMenu ID="radCSMenu" runat="server" Flow="Vertical" OnItemClick="radCSMenu_ItemClick"
OnPreRender="radCSMenu_PreRender" Width="162px" Height="32px" >
<CollapseAnimation Duration="200" Type="OutQuint" />
</telerik:RadMenu>
I have this menu in a frame.
i want to have child items in one of the item.
child item is appearing.But the child item is showing from right to left, which is from the left of the parent item.
can some one help.
RadMenuItem
docItem = new RadMenuItem("Documents");
docItem.Attributes.Add("onclick", "javascript:window.top.content.location.href='YearEnd.aspx?p=" + sparam + "'");
docItem.Items.Add(
new RadMenuItem("DOC 1"));
radCSMenu.Items.Add(docItem);
Can someone help.
<
radC:SlComboBox ID="slcbRackOfferEntity" runat="server" Width="250px" DataSourceID="odsRacks" DataTextField="Caption" DataValueField="Id" AutoPostBack="True" SelectedValue='<%# Bind("RackId") %>' OnSelectedIndexChanged="slcbRacks_SelectedIndexChanged"></radC:SlComboBox>
How can I get DataValueField of selected value at client side on button client click event?SelectedContent
</noscript>

I'm opening from a Default.aspx a modal RadWindow1 this windows contains some Controls (textbox, dropdownlist, etc) also contains this modal RadWindow1 a Button that opens another modal RadWindow2. This all works fine and it opens nicely above the first opened modal RadWindow1.
The problem i have now is that the modal RadWindow2 is not 100% modal ... when i click on a Random Control (eg textbox, etc) in the modal RadWindow1 the modal RadWindow2 gets behind the modal RadWindow2 WTF ?
The strangest thing of all is that i try'ed to reproduce the problem in a sample file but this all works fine ... Could somebody plz look at my sample file and maybe he/she sees the problem what i have in my real project. If you need any additional information just ask them and ill provide them.
Download sample project file where it works fine here
Here some extra information added
the Default.aspx inherits a MasterPage file that has the Control: RadWindowManager this looks like this:
<telerik:RadWindowManager ID="windowManager" Skin="Vista" VisibleStatusbar="False" Modal="True" DestroyOnClose="True" runat="server" Behaviors="Close"></telerik:RadWindowManager>
The way i always open my modal RadWindows:
var radWindow = parent.window.raopen(url, name);
setTimeout(function() { radWindow.setActive(true); }, 0);
If you need anything else to help me out just yell and ill provide it to you ...