Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
354 views
Hi,

I am trying to register events on the RadListBox but whatever I do the event never fires for OnInserted, OnInserting, OnTransferred and OnTransferring. The only event that does get fired is the OnDeleted event. I have tried to register events in the markup and in code-behind to vain.

Please help me out with this.

Regards,

Ali
Ali Kitabi
Top achievements
Rank 1
 answered on 12 May 2010
6 answers
634 views
Hello,

I have a RadTreeView in which i am dynamically adding nodes from classes that are inherited from RadTreeNode. Each class defines few different text fields, as well as a NodeTemplate (each class uses its own node template).

Everything seems to render fine, until a postback is fired. It seems that as soon as the page posts back, all my NodeTemplates become null. I have tried explicitly setting EnableViewState=true on my RadTreeView and all my nodes, and basically every object i am using.

Also depending on the number of child nodes I add (i haven't found a specific pattern to this), the page sometimes doesn't even postback at all, but just gives me ViewState Errors. In this situation if i remove the line where i define my NodeTemplate in each class, the error goes away. It all seems to boil down to my node templates not persisting on postback.

The problem seems to be similar to this: http://www.telerik.com/community/forums/aspnet/treeview/radtreeview-nodetemplate-navigateurl.aspx , but i am not using NavigateUrl. The only base properties that i am setting are Text, Value, NodeTemplate and EnableViewState.

I downloaded the latest trial version last week (DLL version 2010.1.415.35)
Any thoughts?

Thanks.





Peter Blair
Top achievements
Rank 1
 answered on 12 May 2010
2 answers
94 views
Hi,

I followed the example from your demo page. I am trying to display images as sushi page. I like to do the following:

  1. Display 10 images
  2. Select an image
  3. navigate through each page on listview

The problem I have is that each time I navigate through the page, my asp page reload itself and doesn't use ajax method.
Could you please tell me what I am missing here?
Please see the code below
'Format Code Block'(<asp:ObjectDataSource ID="dslogo" runat="server"

 

 

 

 

 

OldValuesParameterFormatString="original_{0}"

 

 

 

 

 

 

 

SelectMethod="ListImages"

 

 

 

 

 

 

 

TypeName="logosBLL.logo" >

 

 

 

 

 

 

 

 

</asp:ObjectDataSource>

 

 

 

 

 

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

 

 

 

 

 

 

<AjaxSettings>

 

 

 

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="SushiPanel">

 

 

 

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="SushiPanel" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

 

 

 

</AjaxSettings>

 

 

 

 

 

 

 

 

</telerik:RadAjaxManager>

 

 

 

 

 

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Black">

 

 

 

 

 

 

 

 

</telerik:RadAjaxLoadingPanel>

 

 

 

 

 

 

 

 

<telerik:RadListView ID="RadListView1" runat="server" DataSourceID="dslogo"

 

 

 

 

 

 

 

 

ItemPlaceholderID="PlaceHolder1" AllowPaging="true">

 

 

 

 

 

 

 

 

<LayoutTemplate>

 

 

 

 

 

 

 

 

<div class="sushibar">

 

 

 

 

 

 

 

 

<asp:Panel ID="SushiPanel" runat="server">

 

 

 

 

 

 

 

 

<div class="sushi">

 

 

 

 

 

 

 

 

<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>

 

 

 

 

 

 

 

 

</div>

 

 

 

 

 

 

 

 

<telerik:RadDataPager ID="RadDataPager1" runat="server" PageSize="10" Skin="Black">

 

 

 

 

 

 

 

 

<Fields>

 

 

 

 

 

 

 

 

<telerik:RadDataPagerButtonField />

 

 

 

 

 

 

 

 

</Fields>

 

 

 

 

 

 

 

 

</telerik:RadDataPager>

 

 

 

 

 

 

 

 

</asp:Panel>

 

 

 

 

 

 

 

 

</div>

 

 

 

 

 

 

 

 

</LayoutTemplate>

 

 

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

 

 

<div class="category">

 

 

 

 

 

 

 

 

<asp:Image runat="server" ID="imglogo2" Height="70px" Width="70px" ImageUrl='<%# Eval("logopath") %>' />

 

 

 

 

 

 

 

 

</div>

 

 

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

 

 

<SelectedItemTemplate>

 

 

 

 

 

 

 

 

<div class="selected">

 

 

 

 

 

 

 

 

<asp:Image runat="server" ID="imglogo2" Height="70px" Width="70px" ImageUrl='<%# Eval("logopath") %>' />

 

 

 

 

 

 

 

 

</div>

 

 

 

 

 

 

 

 

</SelectedItemTemplate>

 

 

 

 

 

 

 

 

</telerik:RadListView>

 

 

 

 

 

 

)

And also I get the following warning in my project:
Warning 6 Reference to type 'System.Web.UI.WebControls.IPageableItemContainer' claims it is defined in 'd:\Visual Studio 2010\Projects\wave10\wave10\bin\System.Web.Extensions.dll', but it could not be found c:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q1 2010\Bin35\Telerik.Web.UI.dll wave3

Many thanks in advance
Kamal

Kamal Mostofi
Top achievements
Rank 1
 answered on 12 May 2010
1 answer
218 views

Hi,

We have a page with many (>15) radEditors.  We would like to make sure that our output is XHTML compliant.  However, if we use the default behavior and apply the content filters upon submit, we observe a long delay before the page actually begins to submit, because the time it takes to execute the filters on all of the editors is long.  We have attempted to optimize this performance by disabling unneeded filters and following the guidance provided on your site, but the performace is still not what it needs to be for our application.

One possible solution we are investigating is to apply the filters on the blur event of the radEditors.  We have tried to implemented code like this:

 
    function RadEditor_OnClientLoad(editor, args) {  
        var designElement = editor.get_contentArea();  
        var htmlElement = editor._getTextArea();  
        var jQueryWrappedSet = $([designElement , htmlElement]);  
        jQueryWrappedSet .bind('blur', { editorId: editor.get_id() }, function(event) { onBlur(event.data.editorId); });  
    }  
 
 
    function onBlur(id) {  
        var editor = $find(id);  
        if (editor.get_mode() == 2)   
            editor.set_mode(1);  
        else 
            setTimeout(function() { editor.set_html(editor.get_html(true)); }, 0);  
    } 

 

So what this code does is, in the radEditor onClientLoad event, get references to the design and html elements of the editor, and then use jQuery to attach an event handler to their blur events.

In the blur events we then apply the content filters.  If the editor is in html mode, we apply the filter by switching the editor to design mode.  If the editor is in design mode, we apply the fitlers by using the set_html function as documented here:
http://www.telerik.com/community/forums/aspnet-ajax/editor/run-custom-content-filter-on-load.aspx

(Note that for simplicity sake in this prototype code it assumes that the filters are currently on.  When we actually implement this, the ContentFilters property will be set to "None" in the markup, and then in the blur event handler we will programmically turn on the filters, apply them, and then disable them so that they will not be applied on page submit.)

There is problem with this solution.  Consider the case where editor "A" has focus, and then you click to set the focus to editor "B".  The problem is that in this case, both the set_mode and the set_html methods that are executed in the blur event of editor "A" set the focus back from editor "B" to editor "A".  This in turn fires the blur event of editor B, and you get an infinite loop.

Is there any way to invoke the set_mode and set_html methods on a radEditor without have the focus set back to that editor?  Or, more generally, is there a better way to apply content filters to the content of a radEditor when the editor loses its focus?

Thank you so much for your assistance!!!

Joe

Dobromir
Telerik team
 answered on 12 May 2010
1 answer
308 views
How can I enable or disable content filters on the client-side via javascript and how can I apply an enabled filter to a particular radEditor using javascript?  

We have a page with many (>15) radEditors.  If we use the default behavior and apply content filters upon submit to insure that our output is XHTML compliant we observe a long delay before the page actually begins to submit. We have attempted to optimize this performance following the guidance provided on your site, but the performace is still not good enough.

What we would like to do is disable content filters in the ASPX markup by setting ContentFilters="None" so they will not be applied upon submit.  Then, whenever a user changes the mode of the radEditor from HTML to Design, or during other client-side events that we control, we would like to turn on the filters, apply them to the particular radEditor content, and then turn off the filters.  We have attempted to follow the suggestions in your forum (i.e. here and here) and have tried using the following code:

function radEditorControl_OnClientModeChange(editor, args) { 
    if (editor.get_mode() == 1) 
        ApplyFilters(editor); 
} 
 
ApplyFilters = function(editor) { 
    //1. Enable filter 
    if (editor.get_filtersManager().getFilterByName("ConvertToXhtmlFilter") != null)  
        editor.get_filtersManager().getFilterByName("ConvertToXhtmlFilter").Enabled = true 
    else 
        Telerik.Web.UI.Editor["ConvertToXhtmlFilter"].Enabled = true; 
         
    //2. Apply filter 
    editor.set_html(editor.get_html(true)); 
      
    //3. Disable filter 
    if (editor.get_filtersManager().getFilterByName("ConvertToXhtmlFilter") != null)  
        editor.get_filtersManager().getFilterByName("ConvertToXhtmlFilter").Enabled = false; 
    else 
        Telerik.Web.UI.Editor["ConvertToXhtmlFilter"].Enabled = false; 
} 

I have tried this with a variety of client-side filters (StripScriptsFilter, FixUlBoldItalic, FixEnclosingP, MozEmStrongFilter, ConvertFontToSpanFilter, ConvertToXhtmlFilter).  In all cases the javascript code executes fine, but the radEditor content is not modified by the filter.

Do you have any guidance for me?  Thanks so much for the help!

Joe
Dobromir
Telerik team
 answered on 12 May 2010
4 answers
506 views
Hello,

In RadControls for ASP.NET AJAX Q1 2008 there is a change in the Client-Side API. The compatibility layer which was used in the transition beta period is now removed. All client-side methods strictly follow the ASP.NET AJAX conventions and are lower case.
For instance: get_activeToolTip() should always be used from now on, get_ActiveToolTip() is no longer supported. This also results in significant improvement in page loading times.

Best regards,
The Telerik team
Petio Petkov
Telerik team
 answered on 12 May 2010
5 answers
120 views
Whenever anything is an all day event it only is displayed to be half of the hight of the "All Day" Row.  Is there a way to change this?
Peter
Telerik team
 answered on 12 May 2010
1 answer
120 views
Hi,

I have a user control in which a RadGrid is place with the OnUpdateCommand set to a method in the code behind. The contro works fine if placed on a page by itself.

However when i place the control inside an RadAjaxPanel event is not being fired.

Things I have tried:
1. I place an RadAjaxManager on the page, then i placed a RadAjaxManagerProxy inside the usercontrol with settting to updatedcontrol to the RadGrid1. But this does not set the event to fire.
2. moved the user control to the page outside the RadAjaxPanel and the updatecommand event fired. Moved it back into the RadAjaxPanel and the event does not fire.

The RadAjaxPanel id is "RadAjaxPanel1"
The RadGrid id is "RadGrid1"
The usercontrol id is "usrCtrl1"
Tsvetoslav
Telerik team
 answered on 12 May 2010
9 answers
218 views
Hi,

I was just wondering if it's possible to format specific dates.  I have a list of Stat holidays that I want to grab from the database and I basically just want them to be a different colour than all the other dates.  Is that possible?
Chris
Top achievements
Rank 1
 answered on 12 May 2010
4 answers
274 views
Hi,
I'm trying to create a RadGrid that has a fixed height, but always has the pager at the very bottom, no matter how many rows are shown.  Setting the height of the RadGrid (the div wrapper), will stretch the container to that height, however, the master table is only as tall as the amount of rows it contains (see  attached screenshot), so the pager isn't at the bottom. When I set a height for the master table, the pager is in the correct position, but the rows expand to fill the table. What I need is the rows to stay a fixed height, and have the pager at the very bottom of the div. Is this possible?
Thanks,
Mike
hamid bahan
Top achievements
Rank 1
 answered on 12 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?