Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
218 views
By default, some of the toolbars are disabled within the toolsfile.  If a user has permission we enable one or more toolbars.  How do I enable a toolbar via code?  I have the following function:
 
    ' Name:         EnableToolbar  
    ' Purpose:      Enables the toolbar.  
    ' Parameters:   radEditor      - The rad editor.  
    '               strToolbarName - The name of the toolbar to enable.  
    ' Returns:      Nothing.  
    Public Shared Sub EnableToolbar(ByRef radEditor As RadEditor, ByVal strToolbarName As String)  
 
        Dim radEditorToolGroupCollection As EditorToolGroupCollection  
        Dim radEditorToolGroup As EditorToolGroup = Nothing 
        Dim l_bToolbarFound As Boolean = False 
 
        ' Read the collection of tools.  
        radEditorradEditorToolGroupCollection = radEditor.Tools  
 
        ' Iterate through the collection.  
        For Each radEditorToolGroup In radEditorToolGroupCollection  
            If (radEditorToolGroup.Tag = strToolbarName) Then  
                ' I have found the toolbar, but how do I enable it?  
            End If  
        Next  
    End Sub 

which identifies the correct toolbar but there is no enabled property to set.  Any ideas how to do this?

Many thanks
George
Telerik team
 answered on 25 Feb 2008
5 answers
309 views
Hi,

Setting DestroyOnClose="true" in RadWindowManager does not appear to work. The code worked okay with RadWindow 1.9 but not with 2.0.

Windows are opened using RadWindowManager and closing a window does not remove it from the manager.

<telerik:RadWindowManager  
            id="RadWindowManager1" 
            VisibleOnPageLoad="true" 
            DestroyOnClose="true" 
            ShowContentDuringLoad="false" 
            Skin="Vista" 
            InitialBehaviors="Close,Maximize,Minimize,Move,Resize" 
            MinimizeZoneId="HorizontalMinimize" 
            OnClientShow = "OnClientShowRadWindow" 
            OnClientPageLoad = "OnClientPageLoadRadWindow" 
            OnClientDragStart = "OnClientDragStartRadWindow" 
            OnClientDragEnd = "OnClientDragEndRadWindow" 
            OnClientClose = "OnClientCloseRadWindow" 
            runat="server">  
            <Windows> 
                <telerik:RadWindow ID="ModalWindow" runat="server" Behavior="None"   
                    DestroyOnClose="true" Modal="true"   
                    VisibleOnPageLoad="false" /> 
            </Windows> 
        </telerik:RadWindowManager> 

Am I doing something wrong ?

Bob.
Georgi Tunev
Telerik team
 answered on 25 Feb 2008
3 answers
239 views
I'm trying to get my link button to work with the RadGrid in generating an Excel file.  I have a RadAjaxManager which is performing some AJAX on my page - most notably the link button and grid.  However, when clicking the link button nothing happens and after doing some research I think I understand why...

The export functionality cannot use AJAX, therefore it needs to be disabled when making the request.  I found a thread in the forums that posted some sample code and it looks great.  The only difference (and the one I believe is causing the issue) is that the example is done on a single content page, whereas mine is inheriting a Master Page.  So anyway, the client-side code of interest looks like this...

 <script type="text/javascript">

    function mngRequestStarted(ajaxManager, eventArgs)

    {

      if(eventArgs.EventTarget == "lnkExcel")

      {

         eventArgs.EnableAjax = false;

      }

    }

 </script>


This does not have any affect when used within the Master Page.  I can actually see a slight movement of the grid so I know Ajax is still working here.  After a bit of debugging, I found the if statement never returns true because the control is nested in the Master Page and gets a funky id (thanks ASP.NET).  


How do I change the "lnkExcel" part to return the id of the control even when it's on a Master Page?


Thanks.

Steve
Telerik team
 answered on 25 Feb 2008
4 answers
140 views
Hi, I've got a RadWindowManager control sited on a page with an IFrame. I have a javascript function to show a dialog window but whichever method i use (radopen, GetRadWindowManager etc) it always fails with RadWindowManager undefined. If I take the Iframe off it works fine. Can you help with this problem please.

Thanks in advance,

John
John
Top achievements
Rank 1
 answered on 25 Feb 2008
2 answers
128 views
Hi,
before sending detailed data, please check, if this "message" has something meaningful for you:
****************************************
[Exception... "'Sys.ScriptLoadFailedException: Sys.ScriptLoadFailedException: Fehlender Aufruf von Sys.Application.notifyScriptLoaded().' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]
Sys$CultureInfo$_getAbbrMonthIndex("")
******************************************
This happens, when invoking a dynamically created editor-instance in a Pane (and asp:panel) via Ajax from another Pane.
Without Ajax, all is ok.

Best regards,
Andreas
Tsvetie
Telerik team
 answered on 25 Feb 2008
1 answer
164 views
When I add or edit a row, I would like to set the values in the textboxes via a javascript on the client side (not only as "default values").

My business case is to enter first an amount and let the javascript calculated the others values.

Is there a way to access the controls and set the values?

Thanks
Eric
Sebastian
Telerik team
 answered on 25 Feb 2008
1 answer
46 views
Just a general question here based off my previous use of ComponentArt's tool.

I found the Search feature for their Grid control to be very useful, especially in larger grids with a lot of columns.

Does Telerik have any plans to implement this type of functionality into the Grid component?
Yavor
Telerik team
 answered on 25 Feb 2008
9 answers
254 views
My work requires me to create composite controls on a regular basis.  Often I want these controls ajaxified.

But, I'm having trouble using the RadAjaxManager in a composite control.
I've done an exhaustive search through these forum and find others encountering similar problems with dissimiliar project requirements, but the solutions suggested either don't apply or don't work.

First Question:
In a Custom Composite Control, how does one check for the existence of a RadAjaxManager on the page and when does one do it. 

Second Question:
I do some recursive enumerations to find the RadAjaxManger on the page, currently.  Its ugly, but it works.  However, each time I reference the RadAjaxManager already existent on the page, the AjaxSettings count of said reference = 0, even though I've added AjaxSettings previously and those settings work seem to work.

After obtaining said reference, I then attempt (in the Composite Control ) to add AjaxSettings to the manager.  If I attempt this in the Composite Control's OnInit I get 'Object not set to an Instance of an Object', although all objects involved are indeed NOT NULL.

If I make the same attemp in the Composite Control's OnLoad, I get an error claiming that the Page object can not be null.  I didn't pass in a page object, the RadAjaxManager was already on the page and I got a reference to it.  This error doesn't seem to detail the actual problem.

I can not isolate the problem into a test project because of the project's requirements.

Anyone have any suggestions how to use RadAjaxManager from customer Composite Controls?
Doug Beard
Top achievements
Rank 2
 answered on 25 Feb 2008
4 answers
248 views
I'm not sure if this post should be under here or under the Prometheus TreeView. We have a Prometheus TreeView with and Prometheus Ajax Manager that is handling all of its postbacks. In the TreeView, there are a considerable number of nodes. Only the first two levels are "visible" and the rest are hidden until the node expanded. At that point, the control postbacks through the ajax manager and the nodes under the node that was expanded are set to visible and then the expand and collapsing is set to be client side so it doesn't need to go to the server anymore.

A user is able to right click on a node and then add a level through the context menu. The user can then right click the new node and choose to edit the text of the node that was added. The issue we are having as that during this process, there are postbacks through the ajax manager. They are able to edit the node, but it appears that after the selection changes and it is posting back the name change, we sometimes get an "Invalid JSON Primitive" popup box. It doesn't always happen, and happens during different postbacks as well, but this is a common set of steps that people take. As soon as a person performs an action that does a true postback that doesn't go through the Ajax manager, the "Invalid JSON Primitive" shows up in the browser window.

So, I'm guessing this problem is related to the Ajax manager. Is there something that I can do to make it not do this anymore. I have been unable to duplicate it on my computer, but have seen it done on the production server.
Rainer Friedl
Top achievements
Rank 1
 answered on 25 Feb 2008
1 answer
258 views
I am trying to select a row from a RadGrid when it binds and I cannot get it to work....

It does not like e.item.dataitem("") nor does it do anything when I use the e.item.selected = true.

Protected Sub vendorGridView_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles vendorGridView.ItemDataBound 
 
        If Session("VendorClientID") = e.Item.DataItem("ClientID") Then 
 
        e.Item.Selected = True 
 
        End If 
 
 
    End Sub 


Any help would be appreciated.
Vlad
Telerik team
 answered on 25 Feb 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?