Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
209 views

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

CSurieux
Top achievements
Rank 2
 answered on 28 May 2008
0 answers
109 views
Jomey
Top achievements
Rank 1
 asked on 28 May 2008
2 answers
136 views

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!


Bart
Top achievements
Rank 1
 answered on 28 May 2008
2 answers
93 views

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.

maha
Top achievements
Rank 1
 answered on 28 May 2008
2 answers
283 views
Hi,

I am new to Telerik's control suite. I need to provide a date picker that only allows the user to choose mondays. Is this possible using the datepicker or calendar controls? I know that I could validate the input to make sure it was a monday, but I would rather disable all other days of the week and just allow them to choose mondays. Otherwise, I will use a dropdown, but it would be nicer to use the calendar control.

Thanks,
JC
JC
Top achievements
Rank 1
 answered on 28 May 2008
5 answers
150 views
Hi,

I'm evaluating the trial version of the rad Grid for ASP.NET/Ajax.  It works well and I've gotten my tests to work correctly, however I am experiencing a redraw issue with Firefox when using GridDropDownColumn and inline editing mode. When I click the edit link the first time after having loaded the page, everything works correctly. However, once I click edit again, it goes into edit mode but doesn't correctly draw my first dropdown column. Also, none of the edit controls fit within the defined column width(this happens in IE as well.)

Any suggestions would be appreciated. Here is a screenshot of the problem.

Screenshot

Thanks,
JC  
JC
Top achievements
Rank 1
 answered on 28 May 2008
1 answer
220 views
Hi,

I have a ComboBox component at page:

<

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?

Thanks.
Atanas Korchev
Telerik team
 answered on 28 May 2008
2 answers
125 views
I have a problem with inserting script to editor content (for google optimizer).

I created some button with this action:

Telerik.Web.UI.Editor.CommandList["AddGoogleOptimizer"] = function(commandName, editor, args)
{
var currentSelectedHtml = editor.getSelectionHtml();

currentSelectedHtml = String.format("<script>utmx_section(\"Section\")<\/script>{0}</noscript>", currentSelectedHtml);

editor.pasteHtml(currentSelectedHtml);
};


Also I disabled RemoveScripts filter (radEditor.DisableFilter(EditorFilters.RemoveScripts)),  but in editor content appear only selected html without any tags (IE 7).

I need to insert the following code:

<script>utmx_section('Section')</script>

SelectedContent

</noscript> 


Is there a way to resolve this problem?

Rumen
Telerik team
 answered on 28 May 2008
2 answers
57 views
My RadScedular is totally distorted in Mozilla2.0
is it competable for Mozilla?
T. Tsonev
Telerik team
 answered on 28 May 2008
1 answer
84 views

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 ...


Svetlina Anati
Telerik team
 answered on 28 May 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?