Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
138 views
I tried your example application with automatic database update you provided in this article: databaseupdate.
It works as long as I set the TransferMode="move". As soon as I try to copy the data with TransferMode="copy", I get a System.NullReferenceException.

[NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.]  
   Telerik.Web.UI.RadListBoxItem.ExtractValues() +10  
   Telerik.Web.UI.RadListBox.PerformInsert(IList`1 items, Int32 position) +251  
   Telerik.Web.UI.RadListBox.PerformTransfer(RadListBox sourceListBox, RadListBox destinationListBox, IList`1 items) +852  
   Telerik.Web.UI.RadListBox.Transfer(IList`1 itemsToTransfer, RadListBox sourceListBox, RadListBox destinationListBox) +184  
   Telerik.Web.UI.RadListBox.OnTransfer(ListBoxPostBackCommand command, Func`2 callback) +137  
   Telerik.Web.UI.RadListBox.RaisePostBackEvent(String eventArgument) +292  
   Telerik.Web.UI.RadListBox.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10  
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13  
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175  
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565  
 

The example code is:

<asp:ScriptManager runat="server" ID="ScriptManager1">  
    </asp:ScriptManager> 
    <div> 
        <telerik:RadListBox   
            runat="server"   
            ID="RadListBox1"   
            AllowTransfer="True" 
            TransferMode="Copy" 
            AllowDelete="false" 
            AutoPostBackOnTransfer="true" 
            AllowAutomaticUpdates="true"   
            TransferToID="RadListBox2"   
            DataSourceID="SqlDataSource1"   
            DataKeyField="ID"   
            DataTextField="Value"   
            DataValueField="ID">  
        </telerik:RadListBox> 
        <telerik:RadListBox ID="RadListBox2" runat="server"   
            AllowAutomaticUpdates="True"   
            DataKeyField="ID" 
            DataSourceID="SqlDataSource2"   
            DataTextField="Value"   
            DataValueField="ID">  
        </telerik:RadListBox> 
          
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"   
            ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"   
            SelectCommand="SELECT * FROM [Table1]"   
            ConflictDetection="CompareAllValues"   
            DeleteCommand="DELETE FROM [Table1] WHERE [ID] = @original_ID AND (([Value] = @original_Value) OR ([Value] IS NULL AND @original_Value IS NULL))"   
            InsertCommand="INSERT INTO [Table1] ([Value]) VALUES (@Value)"   
            OldValuesParameterFormatString="original_{0}"   
            ondeleting="SqlDataSource1_Deleting"   
            UpdateCommand="UPDATE [Table1] SET [Value] = @Value WHERE [ID] = @original_ID AND (([Value] = @original_Value) OR ([Value] IS NULL AND @original_Value IS NULL))">  
            <DeleteParameters> 
                <asp:Parameter Name="original_ID" Type="Int32" /> 
                <asp:Parameter Name="original_Value" Type="String" /> 
            </DeleteParameters> 
            <UpdateParameters> 
                <asp:Parameter Name="Value" Type="String" /> 
                <asp:Parameter Name="original_ID" Type="Int32" /> 
                <asp:Parameter Name="original_Value" Type="String" /> 
            </UpdateParameters> 
            <InsertParameters> 
                <asp:Parameter Name="Value" Type="String" /> 
            </InsertParameters> 
        </asp:SqlDataSource> 
        <asp:SqlDataSource ID="SqlDataSource2" runat="server"   
            ConflictDetection="CompareAllValues"   
            ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"   
            DeleteCommand="DELETE FROM [Table2] WHERE [ID] = @original_ID AND (([Value] = @original_Value) OR ([Value] IS NULL AND @original_Value IS NULL))"   
            InsertCommand="INSERT INTO [Table2] ([Value]) VALUES (@Value)"   
            OldValuesParameterFormatString="original_{0}"   
            SelectCommand="SELECT * FROM [Table2]"   
            UpdateCommand="UPDATE [Table2] SET [Value] = @Value WHERE [ID] = @original_ID AND (([Value] = @original_Value) OR ([Value] IS NULL AND @original_Value IS NULL))">  
            <DeleteParameters> 
                <asp:Parameter Name="original_ID" Type="Int32" /> 
                <asp:Parameter Name="original_Value" Type="String" /> 
            </DeleteParameters> 
            <UpdateParameters> 
                <asp:Parameter Name="Value" Type="String" /> 
                <asp:Parameter Name="original_ID" Type="Int32" /> 
                <asp:Parameter Name="original_Value" Type="String" /> 
            </UpdateParameters> 
            <InsertParameters> 
                <asp:Parameter Name="Value" Type="String" /> 
            </InsertParameters> 
        </asp:SqlDataSource> 

Genady Sergeev
Telerik team
 answered on 17 Aug 2009
1 answer
60 views
Hello,

I have a RadGrid where some columns have RadNumericTextBox. So in total I have 100 textboxes. When the page loads the textboxes appear in one style, then the clien freezes for a few seconds and they go to the required style.

Is there a soultion for this? Or perhaps there is another way of have a grid where multiple fields are open for edit and it's numbers only.


Thanks,

Vlad
Telerik team
 answered on 17 Aug 2009
3 answers
147 views

<

 

telerik:RadToolTipManager ID="HierarchyManagerToolTip" runat="server" Position="TopRight"

 

 

RelativeTo="Element" AutoTooltipify="false" Sticky="true" MouseTrailing="true" OffsetY="0">

 

 

</telerik:RadToolTipManager>

 



I have a user control and inside it I have a custom control Dropdown..Everytime I mouse over my custom Dropdown it  calls a webservice and tooltip shows all the info as needed ..So far it is working great..
But now the tooltips show in all the dropdown which I don't need it all. It show the word in the Dropdown.
 I though that AutoTooltipify="false" would solve my problem, but it  doesn't .. I also have set AutoTooltipify for every postback..still not solved..


thanks,
DIP
Dip
Top achievements
Rank 1
 answered on 17 Aug 2009
3 answers
77 views

OnRowDblClick

 

event is not working in firefox. However it works in IE.

Here is my code:

 

<

 

ClientSettings EnablePostBackOnRowClick="True">

 

 

<Selecting AllowRowSelect="True" />

 

 

<ClientEvents OnRowDblClick="OnGridRowDblClick" OnRowCreating="OnGridRowCreating" />

 

 

</ClientSettings>

 

Vlad
Telerik team
 answered on 17 Aug 2009
3 answers
104 views
This page http://alpha.clickablecommunity.com/ views fine in IE 8 and FF. However it is all messed up in IE 7 and I can't seem to get it fixed. Can you provide some help. Here is my master page and css.
<%@ Master Language="VB" AutoEventWireup="false" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="sidepanel" TagName="sidebar" src="/ascx/leftMenu.ascx"%>
<%@ Register TagPrefix="loginDivTemplate" TagName="login" src="/ascx/loginTemplate.ascx"%>
<!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">
<%@ import namespace="System.Data" %>
<%@ import namespace="System.Data.Sql" %>
<%@ import namespace="System.Data.SqlClient" %>
<%@ import namespace="Telerik.Web.UI" %>
<head id="Head1" runat="server">
    <link href="ClickableCommunity.css" rel="stylesheet" type="text/css" />
    <title></title>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body id="MasterBody" runat="server" style="margin: 0px; height: 100%; overflow: hidden;"
    scroll="no">
    <form id="Form1" method="post" runat="server" style="height: 100%">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <br />
    <asp:ContentPlaceHolder ID="header" runat="server">
    </asp:ContentPlaceHolder>
    <div id="loginDiv">
        <loginDivTemplate:login id="loginPanelContent" runat="server"></loginDivTemplate:login>
    </div>
    <div id="topDiv">
        <div id="image" class="topDivImage">
            <img src="images/logo.jpg" alt="Clickable Community Logo" width="200" height="75" />
        </div>
        <div id="viewMenu" class="viewMenu">
            Menu goes here
        </div>
    </div>
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Vertical" Width="100%"
        Height="100%" CssClass="AllContent" LiveResize="true">
        <telerik:RadPane ID="LeftRadPane1" runat="server" Width="220px" Scrolling="Both"
            BorderStyle="None" BorderSize="0">
            <div id="leftPanel">
                <sidepanel:sidebar id="leftPanelContent" runat="server"></sidepanel:sidebar>
            </div>
        </telerik:RadPane>
        <telerik:RadSplitBar runat="server" ID="RadSplitBar2" CollapseMode="Forward" EnableResize="false"
            ForeColor='Green' />
        <telerik:RadPane ID="RightRadPane1" runat="server" CssClass="RightPanelPadding" Scrolling="Both"
            BorderStyle="None" BorderSize="0">
            <asp:ContentPlaceHolder ID="MainContent" runat="server">
            
            </asp:ContentPlaceHolder>
        </telerik:RadPane>
        
    </telerik:RadSplitter>
    </form>
</body>
</html>
in the panel MainContent I load this control
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="Map.ascx.vb" Inherits="ClickableCommunity.Map" %>
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAANvmC5YwARPSDAHoiTGyjXRR-496V5WiR7LkdzcFVQzFkDe07hhSkvWarTS8udi3TGEWMPQwT-FAGew"
        type="text/javascript"></script>

    <script type="text/javascript">
        
        function loadEarth(mapdiv) {
            
            if (GBrowserIsCompatible()) {
                
                var point;
                if (!mapdiv) return true;
                
                //find the div
                map = new GMap2(document.getElementById(mapdiv));

                //this will add a map overview in the bottom
                //right hand corner
                //map.addControl(new GOverviewMapControl());

                //enable the zooming
                map.enableDoubleClickZoom();
                map.enableScrollWheelZoom();

                //add the different map types i.e. satellite street hybrid
                map.addControl(new GMapTypeControl());
                //add the zoom + and - buttons
                map.addControl(new GSmallMapControl());

                //call the function that adds the menu
                //when the user right clics
                //createContextMenu(map);

                //set the center, position, and type of map to start with
                map.setCenter(new GLatLng(40.7001, -99.0844), 15);
                map.setMapType(G_NORMAL_MAP);

                geocoder = new GClientGeocoder();

                //if we wanted to draw a polyline we would uncomment this code

                //var polyline = new GPolyline([new GLatLng(37.4419, -122.1419),
                //new GLatLng(37.4519, -122.1519),
                //new GLatLng(37.4619, -122.1819)], "#3333cc", 10);
                //map.addOverlay(polyline);

            } //if gbrowseriscompatible
            else {
                document.getElementById(mapdiv).innerHTML = "Sorry, your browser is not compatible" +
                                                        "with our maps application<br>" +
                                                        "Please try updating to a newer version of your browser.";
            }

        } //loadEarth

        function createContextMenu(localmap) {
            contextmenu = document.createElement("rightClickDiv");
            contextmenu.style.visibility = "hidden";
            contextmenu.style.background = "#ffffff";
            contextmenu.style.border = "1px solid #8888FF";

            contextmenu.innerHTML = "<a href='javascript:zoomIn()'>" +
                                    "<div class='context'>  Zoom in  </div></a>" +
                                    "<a href='javascript:zoomOut()'>" +
                                      "<div class='context'>  Zoom out  </div></a>" +
                                    "<a href='javascript:zoomInHere()'>" +
                                      "<div class='context'>  Zoom in here  </div></a>" +
                                    "<a href='javascript:zoomOutHere()'>" +
                                    "<div class='context'>  Zoom out here  </div></a>" +
                                    "<a href='javascript:centerMapHere()'>" +
                                      "<div class='context'>  Centre map here  </div></a>";

            localmap.getContainer().appendChild(contextmenu);
            GEvent.addListener(localmap, "singlerightclick",
                  function(pixel, tile) {
                      clickedPixel = pixel;
                      var x = pixel.x;
                      var y = pixel.y;
                      if (x > localmap.getSize().width - 120) {
                          x = localmap.getSize().width - 120
                      } //if
                      if (y > localmap.getSize().height - 100) {
                          y = localmap.getSize().height - 100
                      } //if
                      var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(x, y));
                      pos.apply(contextmenu);
                      contextmenu.style.visibility = "visible";
                  } //function(pixel, tile)
             ); //GEvent.addListener

            GEvent.addListener(localmap, "click",
                  function() {
                      contextmenu.style.visibility = "hidden";
                  } //function
             ); //GEvent.addlistener
        } //createContextMenu
        function zoomIn() {
            localmap.zoomIn();
            contextmenu.style.visibility = "hidden";
        } //zoomIn      
        function zoomOut() {
            localmap.zoomOut();
            contextmenu.style.visibility = "hidden";
        } //zoomOut      
        function zoomInHere() {
            var point = map.fromContainerPixelToLatLng(clickedPixel)
            localmap.zoomIn(point, true);
            contextmenu.style.visibility = "hidden";
        } //zoomInHere      
        function zoomOutHere() {
            var point = map.fromContainerPixelToLatLng(clickedPixel)
            localmap.setCenter(point, map.getZoom() - 1);
            contextmenu.style.visibility = "hidden";
        } //zoomOutHere      
        function centerMapHere() {
            var point = map.fromContainerPixelToLatLng(clickedPixel)
            localmap.setCenter(point);
            contextmenu.style.visibility = "hidden";
        } //centerMapHere

    </script>
<div id="divMap">
</div>




CSS Page


body {
height:100%;
}
#leftPanel{
    display:inline;
    height:500px;
    width:220px;
    border-top-style: none;
    border-right-style: none;
    border-left-style: none;
        
}
.loginLabel{
    padding-right: 10px;
    padding-bottom: 10px;
}
.loginTextBox{
    width: 120px;
}
.leftPanelContent{
    padding-bottom: 30px;
}
#topDiv{
    height: 60px;
    border-bottom-width: 4px;
    border-bottom-color: Gray;
    border-bottom-style:groove;
        
}
#loginDiv{
    position: absolute;
    display:inline;
    right: 10px;
    top: 5px;
}
#menuDiv{
    position: absolute;
    padding-top: 75px;
    margin-left: auto;
    margin-right:auto;
}
.AllContent{
    border-right: none;
    
}
.addBusinessLabel{
    padding-top: 5px;
    padding-bottom: 2px;
    text-align: center;
    display: block;
}
.addBusinessTextBox{
    width:150px;
    text-align:center;
}
#MainContent{
    display:inline;
    height:500px;
    width:400px;
}
.displayInline{
    display: inline;
}
#divMap{
    height:480px;
    width:700px;
    border: groove 4px #EEEEEE;
    border-right: groove 4px #EEEEEE;
    margin-left: auto;
    margin-right: auto;
}
.RightPanelPadding
{
    position: relative;
    height:500px;
    padding-left: 35px;
    padding-top:10px;
    
}
.topDivImage{
position: absolute;
top: 0;
left: 0;
display:inline;
width:220px;
}
.viewMenu{
padding-left:220px;
margin-right:auto;
margin-left:auto;
text-align:center;
width:800px;
vertical-align:bottom;
padding-top: 46px;
}
.emptyTextboxText{

    font-style:italic;
    font-size:10px;
    color: #D8D8D8;

}

Thanks,
Svetlina Anati
Telerik team
 answered on 17 Aug 2009
7 answers
229 views
Hi

I have a long piece of text, I would like to be scrolled in a box. How can it be accomplished by RadRotator? It is not possible to split the text into smaller frames rotating through the frames, it all should be in only one frame.

Best regards,

Kasper Bergmann
Georgi Tunev
Telerik team
 answered on 17 Aug 2009
1 answer
182 views
Hello,
In the demo found here, the screen boundary detection does not seem to work when the menu open position is set to top left or top right. I tried this in IE6 and firefox. Is there away to fix this?
Thanks
Dimo
Telerik team
 answered on 17 Aug 2009
2 answers
349 views
Hello everybody, I have posted this question a few times on some different forums with know luck.  I am trying to upload a file to a specific folder based on treeview node selection.  Here is my code.  Can anybody help?  Thanks

Imports System.IO
Imports Telerik.Web.UI

 

Partial Public Class uploadfiles
    Inherits System.Web.UI.Page

   
  

    Protected Sub UploadButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles UploadButton.Click
        BindResults()
    End Sub

    Private Sub BindTreeToDirectory(ByVal dirPath As String, ByVal parentNode As RadTreeNode)
        Dim dirs As String() = Directory.GetDirectories(dirPath)
        Dim s As String
        For Each s In dirs

            Dim parts As String() = s.Split("\"c)
            Dim name As String = parts((parts.Length - 1))
            If name <> "Examples" Then
                Dim node As New RadTreeNode(name)
                node.ImageUrl = "Folder.gif"
                node.Value = name
                node.Category = "Folder"
                parentNode.Nodes.Add(node)

                BindTreeToDirectory(s, node)
            End If
        Next s

        Dim files As String() = Directory.GetFiles(dirPath)
        Dim fileNAme As String
        For Each fileNAme In files
            Dim parts As String() = fileNAme.Split("\"c)
            Dim name As String = parts((parts.Length - 1))
            Dim node As New RadTreeNode(name)
            Dim fi As New FileInfo(fileNAme)
            node.ImageUrl = "File.gif"
            node.Value = fi.Name & "@" & fi.Length.ToString() & "@" & fi.LastWriteTime.ToString()
            node.Category = dirPath & "\" & fi.Name

            parentNode.Nodes.Add(node)
        Next fileNAme
    End Sub

    Private Sub BindResults()
        Dim resultsExist As Boolean = RadUpload1.UploadedFiles.Count > 0
        lblNoResults.Visible = Not resultsExist
        rptReqults.Visible = resultsExist
        If resultsExist Then
            rptReqults.DataSource = RadUpload1.UploadedFiles
            rptReqults.DataBind()
        End If
      
        Dim rootFolder As String = Server.MapPath("~/filefolders/")
        Dim rootNode As New RadTreeNode(rootFolder)
        RadTree1.Nodes.Clear()
        rootNode.Text = "Software"
        rootNode.Value = Server.MapPath("~/filefolders/")
        rootNode.ImageUrl = "Folder.gif"
        rootNode.Category = "Folder"
        rootNode.Expanded = True
        RadTree1.Nodes.Add(rootNode)
        BindTreeToDirectory(rootFolder, rootNode)
        Dim uploadnode As RadTreeNode = RadTree1.FindNodeByText("RadTree1.SelectedNode.Text")
        uploadnode.Expanded = True
  End Sub

    Private Sub InitializeComponent()
        Dim nd As New DirectoryInfo(Server.MapPath(".") & "/filefolders/" & RadTree1.SelectedNode.Text & "/")
        If nd.Exists = False Then
            nd.Create()
        End If
        RadUpload1.TargetFolder = "~/filefolders/" & RadTree1.SelectedNode.Text & "/"

    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            'Dim rootFolder As String = ConfigurationManager.AppSettings("ParentFolderPath")
            Dim rootFolder As String = Server.MapPath("~/filefolders/")
            Dim rootNode As New RadTreeNode(rootFolder)
            rootNode.Text = "Santricity"
            rootNode.Value = Server.MapPath("~/filefolders/")
            rootNode.ImageUrl = "Folder.gif"
            rootNode.Category = "Folder"
            rootNode.Expanded = True
            RadTree1.Nodes.Add(rootNode)
            BindTreeToDirectory(rootFolder, rootNode)
            'RadUpload1.TargetFolder = "~/filefolders/" & ("Linux") & "/"

        End If

    End Sub
End Class

Bryan Davis
Top achievements
Rank 1
 answered on 17 Aug 2009
1 answer
108 views
I have a set of RadRotator items that has PNG images and when I use "Autoadvance" mode it still got the "Opacity=1" set when the first iteration finishes. This has caused the page unusable in IE. (Everyone knows that IE displays a dark background when PNG and Opacity setting are combined... :-( Firefox is perfect in this case)

I digged around and found that the script in "AnimationScript.js" towards the end of the file in "jMove.Prototye" there is a line that sets this opacity =1 and if we can some how make it to NOT to set it we should be fine.

This script is considered part of the framework I assume, but is there any way we can modify it or override it without having to ask telerik to fix it in the next release? 

Many thanks in advance,

Feng
Georgi Tunev
Telerik team
 answered on 17 Aug 2009
1 answer
75 views
Hello,

Our company is currently using the Telerik rad controls for ASP.NET AJAX and we noticed in IE8 that whenever you have a radpanel bar (like the one in the samples) in a page there tends to be issues with clicking on/in textboxes. When the cursor is placed in the textbox it blinks rapidly as if something is happening behind the scenes and occasionally we can't even type in the textboxes or characters will not show up. I know it sounds odd but just spent a day tracing through out application and when I removed the radpanelbar from the page the textbox/cursor behaved normally. When I added it back in the anomalies came back as well.

Thanks.
Paul
Telerik team
 answered on 17 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?