Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
78 views
I am trying to use a grid as part of a user control to get user input.  I have a GridClientSelectColumn.  What I would like to accomplish is to continue to use the standard row/alternating row formatting when the row is selected, so that the only difference that the user sees is the checkbox is either checked or not.

Any suggestions?

Thanks!
Diego
Top achievements
Rank 1
 answered on 01 Aug 2010
3 answers
164 views

We have a telerik site that my developers are trying to move onto a production hosting environment. The hosting environment provides a marginally modified medium trust level. When we try to run the application, we get a security exception error as shown below. I've read the comments about RadUpload ProgressHandler requiring reflectionpermission, but the app is not using RadUploads, and all references to RadUpload and RadUploadProgressHandler have been removed from web.config.

Is there anything else that would be trying to use reflectionpermission? I have no idea where to begin looking for the issue.

Thanks in advance,

------------------------------------

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

shahab
Top achievements
Rank 1
 answered on 01 Aug 2010
3 answers
113 views

Hi there

I have been experimenting with loading and saving dock states to a DB but have an issue.

When I run the code the docks are not added to the page - rather they are but the source code has a 'style display:none' so I presume this is hiding the docks?? Its all I can think off as I cant see any other issues.

Can somebody have a look below and see what I am doing wrong........

This is the ASPX.................

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Test Docks.aspx.vb" Inherits="IFM_Code_Testing.Test_Docks" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
  
        <script type="text/javascript">
            var currentLoadingPanel = null;
            var currentUpdatedControl = null;
            function RequestStart(sender, args) {
                currentLoadingPanel = $find("LoadingPanel1");
                currentUpdatedControl = "TableLayout";
                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>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
      
    <div >
        <asp:Panel ID="Panel1" runat="server">
            <telerik:RadDockLayout ID="RDLayout" Runat="server" OnSaveDockLayout="RDLayout_SaveDockLayout" OnLoadDockLayout="RDLayout_LoadDockLayout" EnableEmbeddedSkins="false">
                <table id="TableLayout">
                    <tr>
                        <td>
                            <telerik:RadDockZone ID="RDZoneLeft" runat="server" Width="300" MinHeight="300" ></telerik:RadDockZone>
                        </td>
                        <td>
                            <telerik:RadDockZone ID="RDZoneRight" runat="server" Width="300" MinHeight="300"  ></telerik:RadDockZone>
                        </td>
                    </tr>
                </table>
            </telerik:RadDockLayout>
        </asp:Panel>
   </div>
    <telerik:RadAjaxManager ID="RAManager" runat="server" ClientEvents-OnRequestStart="RequestStart" ClientEvents-OnResponseEnd="ResponseEnd"></telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" MinDisplayTime="500" Skin="Default"></telerik:RadAjaxLoadingPanel>
    </form>
</body>
</html>


And this is the ASPX.VB...
Imports System
Imports System.Collections.Generic
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports Telerik.Web.UI
Imports System.Text
Imports System.Data.SqlClient
Imports System.Collections
Imports System.Configuration
  
Public Class Test_Docks
    Inherits System.Web.UI.Page
    Private _conn As New SqlConnection(ConfigurationManager.ConnectionStrings("dbconnectionsstring").ConnectionString)
    Private _userID As Integer = 999999
    Private ReadOnly Property CurrentDockStates() As List(Of DockState)
        Get
            'Get saved state string from the database - set it to dockState variable for example 
            Dim dockStatesFromDB As String = ""
  
            _conn.Open()
            Dim command As New SqlCommand("select state from IFM_User_Page_Layout where UserID=999999", _conn)
            dockStatesFromDB = command.ExecuteScalar().ToString()
            _conn.Close()
  
            Dim _currentDockStates As New List(Of DockState)()
            Dim stringStates As String() = dockStatesFromDB.Split("|"c)
            For Each stringState As String In stringStates
                If stringState.Trim() <> String.Empty Then
                    _currentDockStates.Add(DockState.Deserialize(stringState))
                End If
            Next
            Return _currentDockStates
        End Get
    End Property
  
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  
    End Sub
  
    Protected Sub Page_Init(ByVal sender As Object, ByVal e As EventArgs)
        'Recreate the docks in order to ensure their proper operation
        Dim i As Integer = 0
        While i < CurrentDockStates.Count
            If CurrentDockStates(i).Closed = False Then
                Dim dock As RadDock = CreateRadDockFromState(CurrentDockStates(i))
                 CreateSaveStateTrigger(dock)
                   ' LoadWidget(dock)
  
                RDLayout.Controls.Add(dock)
            End If
            System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1)
        End While
    End Sub
  
    Protected Sub RDLayout_LoadDockLayout(ByVal sender As Object, ByVal e As DockLayoutEventArgs)
        For Each state As DockState In CurrentDockStates
            e.Positions(state.UniqueName) = state.DockZoneID
            e.Indices(state.UniqueName) = state.Index
        Next
    End Sub
  
    Protected Sub RDLayout_SaveDockLayout(ByVal sender As Object, ByVal e As DockLayoutEventArgs)
        Dim stateList As List(Of DockState) = RDLayout.GetRegisteredDocksState()
        Dim serializedList As New StringBuilder()
        Dim i As Integer = 0
  
        While i < stateList.Count
            serializedList.Append(stateList(i).ToString())
            serializedList.Append("|")
            System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1)
        End While
  
        Dim dockState As String = serializedList.ToString()
        If dockState.Trim() <> [String].Empty Then
            _conn.Open()
            Dim command As New SqlCommand([String].Format("update States set State='{0}' where id='" + _userID.ToString() + "'", dockState), _conn)
            command.ExecuteNonQuery()
            _conn.Close()
        End If
    End Sub
  
    Private Function CreateRadDockFromState(ByVal state As DockState) As RadDock
        Dim dock As New RadDock()
        dock.DockMode = DockMode.Docked
        dock.ID = String.Format("RadDock{0}", state.UniqueName)
        dock.ApplyState(state)
  
        dock.Commands.Add(New DockCloseCommand())
        dock.Commands.Add(New DockExpandCollapseCommand())
  
        Return dock
    End Function
  
    Private Sub CreateSaveStateTrigger(ByVal dock As RadDock)
         dock.AutoPostBack = True
        dock.CommandsAutoPostBack = True
  
        Dim updatedControl As New AjaxUpdatedControl()
        updatedControl.ControlID = "Panel1"
  
        Dim setting1 As New AjaxSetting(dock.ID)
        setting1.EventName = "DockPositionChanged"
        setting1.UpdatedControls.Add(updatedControl)
  
        Dim setting2 As New AjaxSetting(dock.ID)
        setting2.EventName = "Command"
        setting2.UpdatedControls.Add(updatedControl)
  
        RAManager.AjaxSettings.Add(setting1)
        RAManager.AjaxSettings.Add(setting2)
    End Sub
  
End Class

And this is the state data from thr db (copied from an example on this site)...

{"UniqueName":"10bcf490-d081-4536-b542-df1564a8cade","DockZoneID":"RDZoneLeft","Width":"300px","Height":"","ExpandedHeight":"203","Top":"0px","Left":"0px","Resizable":"False","Closed":"False","Collapsed":"False","Pinned":"False","Title":"Dock","Text":"Added at 12/3/2009 3:40:54 PM","Tag":"~/Controls/ExchangeRates.ascx","Index":"0"}|{"UniqueName":"35ca0eed-774e-48f6-91ab-91dad4253153","DockZoneID":"RDZoneRight","Width":"300px","Height":"","ExpandedHeight":"138","Top":"0px","Left":"0px","Resizable":"False","Closed":"False","Collapsed":"False","Pinned":"False","Title":"Dock","Text":"Added at 12/3/2009 3:41:05 PM","Tag":"~/Controls/Horoscopes.ascx","Index":"0"}|

I cant seem to find any issues apart from the style one mentioned previously.

Any help greatly appreciated

Geoff
Top achievements
Rank 1
 answered on 01 Aug 2010
1 answer
122 views
Is it possible to control the scroll position of a listbox to ensure, for example, that the selected item is displayed/visible?

Thanks,

Brad Smith
brad
Top achievements
Rank 1
 answered on 01 Aug 2010
1 answer
256 views
Hi,

I woud like to know how and where increase property maxJsonLength?

I  was try to add following code in web.config, but doesn't work :(
  <system.web.extensions> 
    <scripting> 
      <webServices>         
      <jsonSerialization maxJsonLength="50000"
        <converters> 
          <add name="ConvertMe"  
             type="Acme.SubAcme.ConvertMeTypeConverter"/> 
        </converters> 
      </jsonSerialization> 
      </webServices> 
    </scripting> 
  </system.web.extensions> 

Marcel Rossi
Top achievements
Rank 2
 answered on 31 Jul 2010
9 answers
210 views

I'm investigating how to reproduce a control on the Oakgov.com website that is used to post news and announcements.  The control on this website uses flash, but I think that Telerik controls may be able to reproduce this behavior.  Does anyone have an example that I can follow?  (It's the control that has tabs labeled Featured, Video, Podcast News/Events.)

http://www.oakgov.com/index.html


Thanks in advance.

Ishmael

louis chan
Top achievements
Rank 1
Iron
 answered on 31 Jul 2010
2 answers
317 views
Hello,

I build a tagcloud based on the content of a certain text. Everything works great. Gratulations on yet another fine RadControl.

I was wondering however if it would be possible to have the click on a tag trigger a clientside javascript function. Through the click I want to call my highlighting script, which obviously would highlight the clicked tag text in my body  text.

Is there any way to achieve this functionality (the javascript function call from a tag).

With regards,

Jeroen
Yeroon
Top achievements
Rank 2
 answered on 31 Jul 2010
1 answer
135 views
Are there any advantages of creating the grid on Page Load instead of Page Init (I use template columns)?

Thanks,
Manuel
Dan
Top achievements
Rank 1
 answered on 31 Jul 2010
7 answers
154 views
can any one help me pls
i am a new user rad control
I create  the code :

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

 

html xmlns="http://www.w3.org/1999/xhtml" >

 

<

 

head runat="server">

 

 

<title>Untitled Page</title>

 

</

 

head>

 

<

 

body>

 

<

 

script type="text/javascript">

 

function

 

SpellCheckDone() {

 

var

 

textbox = $find("<%= RadTextBox1.ClientID %>");

 

textbox.updateDisplayValue();

 

}

</

 

script>

 

 

<form id="form1" runat="server">

 

 

<div>

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

 

 

</telerik:RadScriptManager>

 

 

<telerik:RadTextBox ID="RadTextBox1" runat="server" Columns="50" Rows="10" Skin="Web20"

 

 

TextMode="MultiLine" Text="RadSpell enablez developerz to add multilngual spellchecking capabilties to their ASP.NET applications">

 

 

</telerik:RadTextBox>

 

 

<telerik:RadSpell ID="RadSpell1" runat="server" ControlToCheck="RadTextBox1" DictionaryPath="~/App_Data/"

 

 

SupportedLanguages="en-US,English" OnClientDialogClosed="SpellCheckDone" Skin="WebBlue" WordIgnoreOptions="WordsWithNumbers" />

 

 

&nbsp;

 

 

 

</div>

 

 

</form>

 

</

 

body>

 

</

 

html>

but when i click botton RadTextBox1 the form com empty i can't  make spell i use the book RadControlsAJAXCourseware.pdf
and i took the examp every thing (properties - App_GlobalResources - App_Data -"en-US.tdf)

i use asp.nae vb lang
if any one can make examp an compress to use

thanks for all

 

E
Top achievements
Rank 1
 answered on 30 Jul 2010
2 answers
107 views
Hello,

After 8 hours of trouble shooting, I have to submit for help.

Basically I load a RadToolTip manager into a placeholder in an ASPX page, it works fine... But if the aspx page has a masterpage attached it fails. I tried the isClient false, which doesnt help.

One note is the control name of the image is different in each page;
ContentPlaceHolder1_ctl00_Image1 (w/masterpage)
ctl02_Image1 (w/o masterpage)


Thanks for any help...
Eric

- using Q2-2010 Ajax, VS2010

http://radtooltip.canyondigital.net/ (view sample demonstrating error)

http://radtooltip.canyondigital.net/RadToolTipProject.zip (VS2010 sample project)
TheLostLeaf
Top achievements
Rank 2
 answered on 30 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?