Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
364 views
I am trying to use the drag-and-drop reordering capabilities of the list box control.  I see that there is an Index property in the EventArgs that seems to vary depending on where I drop the dragged list items.  I don't, however, understand the value of this property.  If I am moving items down in the list, Index seems to be the 0-based index of the item after which the dragged items have been dropped.  If I am moving items up in the list, the Index property seems to be 1 more than that.  Perhaps I am thinking of this incorrectly.  Could you please explain the expected behavior?  Thx.
Chris
Top achievements
Rank 1
 answered on 05 Jun 2013
3 answers
838 views

Problem: how to show a RadAjaxLoadingPanel from an ascx after a javascript _doPostBack

First I explain my situation…

Main page containing an ascx. In the main page I must have ajaxManager and ajaxLoadingPanel


ASPX
 
<telerik:RadCodeBlock ID="RadCodeBlockMain" runat="server">
    <script type="text/javascript">
 
        var currentLoadingPanel = null;
        var currentUpdatedControl = null;
        function RequestStart(sender, args) {
            currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>");
            currentUpdatedControl = "<%= Panel1.ClientID %>";
             
            //show the loading panel over the updated control
            currentLoadingPanel.show(currentUpdatedControl);
        }
        function ResponseEnd() {
            //hide the loading panel and clean up the global variables
            if (currentLoadingPanel != null)
                currentLoadingPanel.hide(currentUpdatedControl);
            currentUpdatedControl = null;
            currentLoadingPanel = null;
        }
  
    </script>
</telerik:RadCodeBlock>
 
 
 
 
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
<telerik:RadAjaxManager ID="RadAjaxManagerMain" runat="server">
   <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
</telerik:RadAjaxManager>
 
<asp:Panel ID="Panel1" runat="server" HorizontalAlign="Center">
<uc:polContainer runat="server" ID="polContainer1" />
</asp:Panel>
 
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" >
   <div>
      <asp:Image ID="Image1" runat="server" ImageUrl="/ajax_loader.gif" />
   </div>
</telerik:RadAjaxLoadingPanel>


ASCX

Based on several conditions I fill a literal with Html code loaded on code behind which represents my results which consists in a set of items each one having a clickable part (*Y). The goal is – by clicking an item – reload the result page (ascx) with other items using ajax.

I did that calling in *Y a javascript that performas a __dopostback. That works fine.

The question is how do I show the RadAjaxLoadingPanel when I perform the postback? ?


<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function myFunct(id) {
            __doPostBack ('<%=UpdatePanel1.ClientID%>', id);           
        } 
    </script>
</telerik:RadCodeBlock>
 
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
   <ContentTemplate>
        <asp:Literal ID="LiteralResult" runat="server" />        
   </ContentTemplate>   
</asp:UpdatePanel>   
 
.vb
…
LiteralResult.text+=”<a onclick=""myFunct('" & id & "')"" >" & here_text & "</a>"
…
 
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Page.IsPostBack Then
 
        Dim passedTargetId As String = = Request.Params.Get("__EVENTTARGET")               
        Dim passedArgument As String = Request.Params.Get("__EVENTARGUMENT")
 
         If passedTargetId = UpdatePanel1.ClientID Then
            ‘do something
         End If
    End If
End Sub

Thank you for your attention

Princy
Top achievements
Rank 2
 answered on 05 Jun 2013
1 answer
262 views
Hi Telerik,

I was wondering if there is any way to position the transferring buttons below the radlistbox. The radlistboxes are one below the other, but the button are placed on right hand side of the first radlistbox. I tried with CSS but I didnt get my required style.

Thanks for replying,
Damian.
Shinu
Top achievements
Rank 2
 answered on 05 Jun 2013
1 answer
163 views
Hi,

I'm able to insert".tif" image in the content area using imagemanager. But Editor is not displaying the tif image. It is showing the jpg images, but not the tif images. Even if l load the html that has image tags with '.tif' image, editor is not displaying them.

Could you please help ?
Rumen
Telerik team
 answered on 05 Jun 2013
1 answer
172 views
Hi guys,

There is a radcombobox and an asp checkbox in my page. On unchecking the asp checkbox, i want to remove all items from the radcombobox drop down. I tried using a javascript code and loop through all the items and access each one to delete, but it was not successful. I need a working javascript code.

Thanks,
Needha
Shinu
Top achievements
Rank 2
 answered on 05 Jun 2013
2 answers
117 views
Hi,

I'm using Js code to clone a dockzone and append it to a div:

  dockZone = $find("<%=RadDockZone_Empty.ClientID %>").clone();
                   dockZoneElement = dockZone.get_element();
                   $telerik.$(dockZoneElement).css("display", "block");
                   $telerik.$(dockZoneElement).css("width", "100%");
                   $telerik.$(dockZoneElement).css("min-height", "155px");
  document.getElementById("test").appendChild(dockZoneElement);

Then I want to save the layout using StorageProvider.
' save the raddocklayout
RadDockLayout1.StorageProvider.SaveStateToStorage(
"123456", SaveState)


Private Function SaveState() As String
        Dim dockStates As List(Of DockState) = RadDockLayout1.GetRegisteredDocksState()
        Dim serializer As New JavaScriptSerializer()
        Dim converters As New List(Of JavaScriptConverter)()
        converters.Add(New UnitConverter())
        serializer.RegisterConverters(converters)
 
        Dim stateString As String = [String].Empty
        For Each state As DockState In dockStates
            Dim ser As String = serializer.Serialize(state)
            stateString = stateString + "|" + ser
        Next
        Return stateString
     End Function

However the client-side created dockzones and the docks inside the dockzones are not saved.

I assume the client-side created dockzone cannot be handled by the code-behind's GetRegisteredDocksState ?

What is the correct method to save the client-side cloned dockzone to the database or to get the serializedState ?

Thanks.


Slav
Telerik team
 answered on 05 Jun 2013
9 answers
563 views
I am currently using Telerik RadControls for ASP.net Ajax Version 2012.3.1308.45,
When I set a MaxLength for RadTextBox to 255, everything works correctly except when Copy and Paste text or using mouse right click to paste text into the RadTextBox, it allow the line break '\n\r'  to bypass the MaxLength count.
Somehow from runtime value, I check and compare the length is more than the MaxLength.
This senarios happens in all sorts of browser (FF, IE, Chrome) and even in the Demo site,
I don't understand if this is the correct behaviour or bugs based on the calculation logic.

I would need to include the count for line break '\n\r' as well else it will hit SQL length limit to cause insert or edit error.
What else can I do to cater this?
Eyup
Telerik team
 answered on 05 Jun 2013
1 answer
336 views
Hi All,

I have radtextbox and combobox in a single page. i am using ItemsRequested for radcombobox.
i enter text in radtextbox and i click radcombobox ItemsRequested event.  but i am not able to get radtextbox text in ItemsRequested event.
but i want to get radtextbox value in ItemsRequested event. is there any way. it's very important. Please any one help me ASAP.



Thanks,
Dhamodhran.S
Shinu
Top achievements
Rank 2
 answered on 05 Jun 2013
1 answer
157 views
I just uninstalled all my old telerik controls and installed the latest version of winforms 2013.1.321.0.

I working on a project that I haven't touched in a couple of years.  When I opened out the c# project I get many errors.

RadListBoxItem was giving me an error so I changed it to RadListDataItem and the error went away.  I haven't been able to view my forms because I have so many errors. 

This is the error i'm stuck on now and if anyone can help it would be greatly appreciated. 
This is my code previously

RadListBoxItemCollection itemsToMove = new RadListBoxItemCollection();

and I get this error:

Error    2    The type or namespace name 'RadListBoxItemCollection' could not be found (are you missing a using directive or an assembly reference?)   

I changed the code to
RadListDataItemCollection itemsToMove = new RadListDataItemCollection();

and this is the error i'm getting.

Error    2    'Telerik.WinControls.UI.RadListDataItemCollection' does not contain a constructor that takes '0' arguments   

Thank you



Stefan
Telerik team
 answered on 05 Jun 2013
5 answers
291 views
I have a rad grid that when exported to excel it gives the following error:

"The file you are trying to open [filename].xls, is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"

What can I do to resolve this error?


Princy
Top achievements
Rank 2
 answered on 05 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?