Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
156 views
I have a TooltipManager on the page, and its skin is Vista.
It display a default loading image when it requests content of tooltip from server.

I want to change this image to text like "Loading...".

How can I do that?

Thanks,

-s
Svetlina Anati
Telerik team
 answered on 21 Nov 2008
3 answers
144 views
The export grid to PDF works great but the business has come back with a new request, surprise

They want to add the company logo at the top of the PDF which exports the grid.  Is this possible and if so how?

Thanks!
Sebastian
Telerik team
 answered on 21 Nov 2008
2 answers
123 views
First off, I'm sorry if this has been asked before, I searched but didn't find anything like this, but did find cases where this would be useful.

Anyway....To my question....

There are often times where for simplicity I need to modify/extend the client side code for some of the Telerik Controls.  The RadInputBox for example, I modified to give it Show/Hide methods.  Here's the scenario that caused this:
I needed a RadComboBox to turn into a RadTextBox if there were no DropDownItems available.  So I added a Show/Hide method to the RadTextBox.  I set the RadTextBox's cssclass to be "hidden" (Which actually sets the ID_Text class to hidden, not the wrapper).

It would be nice if an API of sorts was provided that allowed ease of Extensibility.   I have my own "Hack" version to do this that I'll show you, but it'd be nice if the makers of the controls hooked up something that made all of this a little easier.

Here's my TelerikExtender.js
function TelerikExtender() { 
    this._namespaces = []; 
    this._methods = []; 
    this._methodNames = []; 
    this.AddExtension = _registerExtension; 
    this.Init = init; 
 
    function _registerExtension(namespace, methodName, registration) { 
        if (namespace == ""
            return
 
        if (methodName == ""
            return
 
        if (typeof (registration) != "function"
            return
 
        Array.add(this._namespaces, namespace); 
        Array.add(this._methods, registration); 
        Array.add(this._methodNames, methodName); 
    } 
 
    function init() { 
 
        if (this._namespaces) { 
            for (var i = 0; i < this._namespaces.length; i++) { 
                initMethod(this._namespaces[i], this._methodNames[i], this._methods[i]); 
            } 
        } 
    } 
 
    function initMethod(namespace, methodName, method) { 
        if (!namespaceLoaded(namespace)) { 
            setTimeout(function() { 
                initMethod(namespace, methodName, method); 
            }, 0); 
            return
        } 
        if (typeof (eval(namespace + '.' + methodName)) == "undefined") { 
            eval('(' + namespace + '.prototype.' + methodName + ' = ' + method + ');'); 
        } 
    } 
 
    function namespaceLoaded(namespace) { 
        var pieces = namespace.split("."); 
        var piece = ""
        for (var i = 0; i < pieces.length; i++) { 
            if (piece != "") piece += "."
            piece += pieces[i]; 
            if (eval('(typeof(' + piece + ') == "undefined");')) 
                return false
        } 
        return true
    } 
var telerikExtender = new TelerikExtender(); 

And inside of the JavaScript files I need to extend methods, I do something like this at the top:
telerikExtender.AddExtension("Telerik.Web.UI.RadInputControl""Show"function() { 
    alert("Hey, Show() was called!"); 
}); 
 
telerikExtender.Init(); 
 

So then if I have a RadTextBox named someTextBox, I can simply call someTextBox.Show(); and it does its thing!

I'm sure what I'm doing isn't the smoothest or flat out wrong in some regards, but it works for my current scenario.   Anyway, thought I'd share that and see if anyone else had any ideas for a better solution, or if you Telerik guys had or will have some method of easilly extending the client side code.

-Jeff
Jay
Top achievements
Rank 1
 answered on 21 Nov 2008
2 answers
171 views
I am trying to refresh a RadGridfrom a control outside of the grid itself. I am testing this with a button click, but want to implement it on a rad window close. I have seen a ton of examples which I have implemented exactly but I keep receiving a JavaScript error. The error alerts upon clicking the button "Object doesn't support this property or method"

On a side not, all of the examples I have seen use the EnableAJAX="True", but it is not part of the intellisense. Can anyone explain.

I appreciate any help. Thanks

                <telerik:RadGrid ID="gridAccounts" runat="server" EnableAJAX="True" OnItemCreated="gridAccounts_ItemCreated" OnNeedDataSource="gridAccounts_OnNeedDataSource" Skin="" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false"
                    <AlternatingItemStyle CssClass="AltRow" /> 
                    <SortingSettings SortedAscToolTip="Sort A - Z" SortedDescToolTip="Sort Z - A" /> 
                    <MasterTableView AutoGenerateColumns="False" CssClass="DataTable" DataKeyNames="ID"  PageSize="5" AllowPaging="true" AllowSorting="true" AllowNaturalSort="false"
                        <Columns> 
                            <telerik:GridBoundColumn DataField="ID" Visible="false" UniqueName="ID" /> 
                            <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" SortAscImageUrl="../Images/Grid/SortDesc.gif" SortDescImageUrl="../Images/Grid/SortAsc.gif" SortExpression="LastName" UniqueName="LastName" ItemStyle-Width="15%" /> 
                            <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" SortAscImageUrl="../Images/Grid/SortDesc.gif" SortDescImageUrl="../Images/Grid/SortAsc.gif" SortExpression="FirstName" UniqueName="FirstName" ItemStyle-Width="15%" /> 
                            <telerik:GridBoundColumn DataField="UserName" HeaderText="User Name" SortAscImageUrl="../Images/Grid/SortDesc.gif" SortDescImageUrl="../Images/Grid/SortAsc.gif" SortExpression="UserName" UniqueName="UserName" ItemStyle-Width="20%" /> 
                            <telerik:GridBoundColumn DataField="Office" HeaderText="Office" SortAscImageUrl="../Images/Grid/SortDesc.gif" SortDescImageUrl="../Images/Grid/SortAsc.gif" SortExpression="Office" UniqueName="Office" ItemStyle-Width="25%" /> 
                            <telerik:GridBoundColumn DataField="Access" HeaderText="Access" SortAscImageUrl="../Images/Grid/SortDesc.gif" SortDescImageUrl="../Images/Grid/SortAsc.gif" SortExpression="Access" UniqueName="Access" ItemStyle-Width="10%" /> 
                            <telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortAscImageUrl="../Images/Grid/SortDesc.gif" SortDescImageUrl="../Images/Grid/SortAsc.gif" SortExpression="Status" UniqueName="Status" ItemStyle-Width="15%" /> 
                        </Columns> 
                        <SortExpressions> 
                            <telerik:GridSortExpression FieldName="LastName" SortOrder="Ascending" /> 
                        </SortExpressions> 
                        <NoRecordsTemplate>                
                            <div class="GridViewNoRecords">No Records Found</div> 
                        </NoRecordsTemplate> 
                    </MasterTableView> 
                    <PagerStyle Mode="NextPrevAndNumeric" ShowPagerText="false" CssClass="GridViewPager" NextPageImageUrl="~/Images/Grid/PagingNext.gif" FirstPageImageUrl="~/Images/Grid/PagingFirst.gif" LastPageImageUrl="~/Images/Grid/PagingLast.gif" PrevPageImageUrl="~/Images/Grid/PagingPrev.gif" /> 
                </telerik:RadGrid>         
            </asp:Panel>    
            <input type=button value="Refresh" onclick='window["<%= gridAccounts.ClientID %>"].AjaxRequest( "<%= gridAccounts.UniqueID%>", "Rebind")' /> 

        protected override void RaisePostBackEvent(IPostBackEventHandler source, String eventArgument) 
        { 
            base.RaisePostBackEvent(source, eventArgument); 
            switch (eventArgument) 
            { 
                case "Rebind"
                    gridAccounts.Rebind(); 
                    break
            } 
        } 

Yavor
Telerik team
 answered on 21 Nov 2008
2 answers
99 views
I'm looking for a code sample that shows how to automatically select a row of the grid when a RadCombo that is part of a templated column is clicked or selected.   I have a templated column that contains a radcombo control.  If you click outside of the combo, the row gets selected (good).  If the user clicks the combo to dropdown, the row doens't get selected.  this causes confusion for the user because they expect the row to get selected.

Any advice on how to do this?


Thanks
Randy
Top achievements
Rank 1
 answered on 21 Nov 2008
1 answer
169 views
Hi,

Is it possible to catch a drag and drop event to the editor from an external application (like notepad).

For example, someone selects a paragraph of text in notepad, clicks and drags into internet explorer into the editor and releases.

It correctly inserts the text into the editor, but I'd like to catch the event. It doesn't trigger an onpaste event.

Thank you.
Rumen
Telerik team
 answered on 21 Nov 2008
3 answers
295 views
I need to set editor's content to some value on page_load from client script.
<body onload="SetButtons();" >
    <form id="form1" runat="server">
....
....

Iin SetButtons :

<script language = "javascript">

function SetButtons ()
{
var editor = <%=radEditContent.ClientID %>;
    var oArg = window.opener.GetCreativeContent();
    editor.SetHtml(oArg);
}

</script>

This works fine with Q3 2007 controls. I can't reproduce this functionalityin Q2 2008 controls.
Issues I am facing are

- var editor = $find("<%=radEditContent.ClientID%>")

in this case editor is null

or
- set_html is not recognized

Some time I get editor but set_html is not working

Can somebody throw some light on it?
Rumen
Telerik team
 answered on 21 Nov 2008
3 answers
102 views
Hi Telerik Team,

I want to clarify something regarding the Image Map Editor in the RadEditor. Whenever I click the Image Map editor button and select the Call Image Manager button (...) in the pop up window with a User/Contributor access only, it returns an access denied error. But if I have the Admin account, I can use this without error. Is there a way to remove the security permission to avoid that access denied error?

Thanks,
Jo Bert
Lini
Telerik team
 answered on 21 Nov 2008
1 answer
118 views
Hi

After performing a server side action (adding a new record to the database) I want to put that users details into the filter and refresh the grid so that users is displayed and selected.  I cant find a way of altering the filter text etc from the server side.  Some sort of client side solution would be acceptable but again I am struggling to find out how to do it.

Thanks for any help
Daniel
Telerik team
 answered on 21 Nov 2008
14 answers
476 views
Hi,

some of our users (about 5%) report, that they cannot see the content of RadWindow. They see blank, white window without any content. We tried to find out what the possible cause can be, but currently without luck. Problem exists when using either IE7 or FF and also on all OSes (XP, Linux).

All windows are shown using window.radopen(..). We're using framework for dialogs similar to shown by Shaun Peet in KB's article.

We are unable to repro this bug.

Has anybody met a similar situation?

Regards,
Piotr
mayank
Top achievements
Rank 1
 answered on 21 Nov 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?