Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
137 views
Hello,

We have created a web page that uses a RadMenu as a means of navigation. We also use the RadAlert to display message to the user. However, when the RadAlert window is display (and the parent page is disabled) the RadMenu control is still accessible. 
ASPX code:
<telerik:RadWindowManager ID="WindowManager" runat="server" />
<
table >
    <tr>
        <td  valign="top">
            <telerik:RadMenu ID="RadMenu1" Runat="server" Flow="Vertical">
                <Items>
                    <telerik:RadMenuItem Text="item 1">
                        <Items>
                            <telerik:RadMenuItem Text="sub 1 1" />
                            <telerik:RadMenuItem Text="sub 1 2" />
                            <telerik:RadMenuItem Text="sub 1 3" />
                        </Items>
                    </telerik:RadMenuItem>
                 
                    <telerik:RadMenuItem Text="item 2">
                        <Items>
                            <telerik:RadMenuItem Text="sub 2 1" />
                            <telerik:RadMenuItem Text="sub 2 2" />
                            <telerik:RadMenuItem Text="sub 2 3" />
                        </Items>
                    </telerik:RadMenuItem>
                     
                    <telerik:RadMenuItem Text="item 3">
                        <Items>
                            <telerik:RadMenuItem Text="sub 3 1" />
                            <telerik:RadMenuItem Text="sub 3 2" />
                            <telerik:RadMenuItem Text="sub 3 3" />
                        </Items>
                    </telerik:RadMenuItem>
                </Items>
             
            </telerik:RadMenu>
        </td>
        <td valign="top">
            stuff<br />
            <asp:Button ID="btnAlert" runat="server" Text="Alert"
                onclick="btnAlert_Click" />
        </td>
    </tr>
</table>
C# code:
/// <summary>
/// Recursively searches for a control with the specified ID.
/// </summary>
protected Control FindControl(Control control, string id)
{
    Control foundControl = control.FindControl(id);
 
    if (foundControl == null)
    {
        for (int index = 0; index < control.Controls.Count; index++)
        {
            Control childControl = control.Controls[index];
 
            foundControl = FindControl(childControl, id);
 
            if (foundControl != null)
            {
                break;
            }
        }
    }
 
    return foundControl;
}
 
protected void btnAlert_Click(object sender, EventArgs e)
{
    RadWindowManager windowManager =
           FindControl(this, "WindowManager") as RadWindowManager;
 
    if (windowManager != null)
    {
        windowManager.RadAlert("message", 400, null, "title", null);
    }
}

I've tried setting RadMenu1.Enabled = false; before the RadAlert() is called (which works), but the RadMenu does not look correct. The z order of the RadMenu is still above everything else.

Does anybody know how to disable the RadMenu when the RadAlert window is displayed (and enable the RadMenu when the RadAlert window is closed)?

Thanks,

Matt
Matt
Top achievements
Rank 1
 answered on 09 Nov 2011
4 answers
136 views
I can't use TreeList OnItemDblClick Event,give me this error.


"Sys.InvalidOperationException: 'ıtemDblClick' is not an event."

My Codes Here:


<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

    <script type="text/javascript">

        function OnItemDblClick(sender, eventArgs) {
            var item = eventArgs.get_item();
            var message =item.get_displayIndex();
           
        }

    </script>

</telerik:RadCodeBlock>


<telerik:RadTreeList ID="RDLIST" runat="server" Culture="Turkish (Turkey)">
    <ClientSettings>
        <Selecting AllowItemSelection="True" />
      <ClientEvents OnItemDblClick="OnItemDblClick" />
    </ClientSettings>
</telerik:RadTreeList>

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableScriptCombine="false">
</telerik:RadScriptManager>

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
    EnableHistory="True">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RDLIST">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RDLIST" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>




CODEBEHIND:



DataTable  DT;
DataClass dataclass = new DataClass();

 protected void Page_Load(object sender, EventArgs e)
    {

        DT = dataclass.SELECTSQL("MENU", "MENUNAME,ID,CID", "", "", "");

        RDLIST.DataKeyNames = new string[] {"ID"};
        RDLIST.ParentDataKeyNames = new string[] {"CID"};

        RDLIST.DataSource = DT;
        RDLIST.DataBind();

    }
  

Pavlina
Telerik team
 answered on 09 Nov 2011
4 answers
111 views
Hi guys,

After upgrading to telerik 2011.2.915.20 I have found out two bugs related to File Explorer.

Steps to reproduce:
  • Open file explorer
  • Click 'Upload'
  • CLOSE window.
  • Click 'Upload' again.
  • first bug: In Firefox horizontal scroll is appear.
  • Click 'Add' few times (7-8) and in Chrome this window looks like in attached screenshot.

Reproduced on telerik's demo site.

Any suggestions how to fix this?

Thanks in advance,
Ernesto.
Ernesto
Top achievements
Rank 1
 answered on 09 Nov 2011
1 answer
74 views
Hi...
When I press the button "Add new record" integrated in the RadGrid I enter (1°position in the Call Stack) in the NeedDataSource method.

My question is "is it possible know which event run before? If I press the Add Button or a simply Autopostaback of other control in the page? Exist a property of RadGrid that indicate me that the Add Button is pressed ?".

 Thanks
Jayesh Goyani
Top achievements
Rank 2
 answered on 09 Nov 2011
2 answers
86 views
Hi
I have been upgrading an appication from Asp.Net to Asp.Net Ajax. But I'm having trouble making the ajax part working.
All I get is this error:
"Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled." 

As soon as I add a Ajaxsetting programatically or through html I get the same error. 

I have been stuck on this error some while now. I have browsed the forum for help, but cant seem to find a solution to my problem.

Adding a simple page that produces this error

Please help

staleb
Top achievements
Rank 1
 answered on 09 Nov 2011
1 answer
129 views
Hi,

We are having problems with horizontal lines not being aligned in the Scheduler (see attached image not_aligned.png - note that the red areas in the image are appointments that have visible=false and a red background). The mark-up for our Scheduler is:

<telerik:RadScheduler runat="server" ID="CalendarScheduler" DayStartTime="06:00:00" Culture="da-DK" AllowEdit="False" AllowDelete="False" GroupBy="User" DayEndTime="20:00:00" TimeZoneOffset="02:00:00" DataKeyField="ID" Format="HH:mm" DataSubjectField="Subject" DataStartField="Start" DataEndField="End" InsertingInAdvancedForm="True" OverflowBehavior="Expand" ColumnWidth="50px" SelectedView="WeekView" ShowAllDayRow="False" ShowViewTabs="False" Height="414px" OnClientAppointmentInserting="OnClientAppointmentInserting" RowHeight="12px" OnAppointmentDataBound="RadScheduler1_OnAppointmentDataBound" OnTimeSlotCreated="RadScheduler1_TimeSlotCreated" OnFormCreating="RadScheduler1_OnFormCreating" NumberOfHoveredRows="3" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" OnResourceHeaderCreated="RadScheduler1_ResourceHeaderCreated">

It seems that the misaligned lines causes appointments to be misaligned as well: See attached image appointments.png. The three purple appointments should fill out the entire white areas (the appointment data indicates this when we debug) but they do clearly not.

Any ideas?
Plamen
Telerik team
 answered on 09 Nov 2011
17 answers
260 views
Hi
I have an aspx page in a sharepoint site which has a RadHTMLField. When I edit the page and publishes it without updating the RadHTMLField, an extra div gets created as the outer div to the existing contents of the field. And this happens every time I publish the page after editing it.

The code looks like
<radE:RadHtmlField ID="RadHtmlField1" FieldName="FocusOn" AllowSpecialTags="true" AllowScripts="true" runat="server"></radE:RadHtmlField>

Can you plz suggest a script or some other resolution so that the extra div is not checked in with the page every time.
Regards
Sudhanshu Kaushik
Rumen
Telerik team
 answered on 09 Nov 2011
5 answers
71 views
Hello,

I have a treeview and its context menu for which i initialize its items at the design time .
I populate the treeview dynamically. For each node, i want to configure the context menu differently ( ex: Add new contextMenu Items, change their text...). Can I do it at the server side? It seems that the contextMenu is not proper to the node, but to all the treeview? And the modifications are applied to the contextMenus of all the TreeViewItems..

Thank You for Clarification.


Kate
Telerik team
 answered on 09 Nov 2011
1 answer
186 views
I've customized the editor toolbars by removing some buttons while adding my own custom buttons.  I've implemented a clientside OnClientCommandExecuting handler to intercept and cancel keyboard shortcuts to the removed editor buttons.  I also want to handle click events from the editor toolbar custom buttons. 

Telerik documentation says to add onclick handlers to the editor's RadEditorCommandList.  But, I've noticed that custom button click events are first processed by the OnClientCommandExecuting handler before they get to the RadEditorCommandList handlers.  

What is the difference between using these two handlers?  The custom buttons will instigate serverside save and saveas functionality via an ajax post.  I'ld prefer to combine everything into the OnClientCommandExecuting handler, and to launch save/saveas ajax posts from there.  After each launch I will cancel the click event.


<script type="text/javascript">
  
    function OnClientCommandExecuting(editor, args) {
       if ("Save" == args.get_commandName()) {
            alert("OnClientCommandExecuting Save"); 
            args.set_cancel(true);          
        } else if ("SaveAs" == args.get_commandName()) {
            alert("OnClientCommandExecuting SaveAs");
            args.set_cancel(true); 
        }
    } //EOF OnClientCommandExecuting
  
</script>
  
<telerik:RadEditor ID="telerikeditor" Runat="server" 
                   OnClientLoad="onClientLoad"
                   OnClientCommandExecuting="OnClientCommandExecuting">
    <Tools>
        <telerik:EditorToolGroup Tag="grpInputOutput">
            <telerik:EditorTool ImageUrl="Images/radeditorSave.gif" 
                Name="Save" ShowText="False" 
                Text="Save" />
            <telerik:EditorTool ImageUrl="Images/radeditorSaveAs.gif" 
                Name="SaveAs" ShowText="False" 
                Text="Save As" />
            <telerik:EditorSeparator />     
        </telerik:EditorToolGroup>
     </Tools>
     <Content>
     </Content>
</telerik:RadEditor>    
          
<script type="text/javascript"
     //locate this script after the radeditor HTML declaration
    RadEditorCommandList["Save"] = function(commandName, editor, oTool) {
        alert("RadEditorCommandList Save");
    }
</script>
Rumen
Telerik team
 answered on 09 Nov 2011
6 answers
92 views
Hi Telerik team,

is it possible to change the size of the SPRadEditor via Javascript? 

Following code does not work for me:

function OnClientLoad(editor, args) {
    editor.get_contentAreaElement().style.height = 490px;
}


Thank you very much,
Ben
Rumen
Telerik team
 answered on 09 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?