Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
79 views
hi all,

as per title, how to make this possible?

var newDataSource=new kendo.data.DataSource({
                    transport : {
                      read : {
                        url : context+"/master/common/listLocationByCountry/"+data.country.id+"?marketDifferentialId="+data.id+"&locationId="+data.location.id
                      }
                    }
              });
              newDataSource.read();
              var locationName = data.location.name;
              var locationValue=data.location.id;
              var locationDropDown = $("#locationId").data("kendoDropDownList");         
              locationDropDown.setOptions({ dataTextField: "name", dataValueField: "id" });
              locationDropDown.setDataSource(newDataSource);
              $("#locationId").val(locationValue).data("kendoDropDownList").text(locationName);


the problem is the dropdown is still access url from old datasource to pupolate.

thanks
Erik
Top achievements
Rank 1
 asked on 11 Nov 2014
1 answer
80 views
I got that error when I am building a menu based on a sqlDataSource with the following SelectCommand:
SelectCommand="SELECT '1' AS id, null as pid, 'A&SI' AS text, '' as url
UNION ALL
SELECT '2', null, 'P&P',''
UNION ALL
SELECT '3', null, 'T&E',''
UNION ALL
SELECT '4', null, 'FTR',''
">

However, it works if I add two union statements like below to the end:
SelectCommand="SELECT '1' AS id, null as pid, 'A&SI' AS text, '' as url
UNION ALL
SELECT '2', null, 'P&P',''
UNION ALL
SELECT '3', null, 'T&E',''
UNION ALL
SELECT '4', null, 'FTR',''
UNION ALL
SELECT '7', null, '',''
UNION ALL
SELECT '8', '7', '',''
">

The selectcommand eventually will be replaced by a stored procedure and I do not want to fix the problem by manipulating the procedure using dirty tricks like this.

Any ideas? Thanks!!
Boyan Dimitrov
Telerik team
 answered on 10 Nov 2014
10 answers
196 views
Hi

I'm facing a problem with radgrid while using frozen column.

Frozen column works fine when used with horizontal scroll bar, but when i traverse the grid using Tab button (through keyboard) the frozen column doesn't works also the scroll bar position remains fixed.

Any help in this regard would be highly appreciated.

Thanks
Gaurav

Pavlina
Telerik team
 answered on 10 Nov 2014
1 answer
179 views
Windows 7 pro x64
VS2008 web page
Telerik UI for ASP.NET AJAX Q2 2014 - Bin35


In this simple page, there is a context menu with 3 items
the third item uses a content template.
Right click over the text to show the context menu.
The third item does not show up in the browser but is rendered along with an empty iframe. why?

my goal is to put some text and a textbox (html element) where the text would normally be in a radMenuItem.
something like
<content Template>part number contains: <input type="textbox" /></contentTemplate>
so that the user can right-click and click in the textbox and type something in. (I can catch the ENTER keystroke and do the post back)

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test_rad_context_menu.aspx.vb" Inherits="test_austin_test_rad_context_menu" %>
<!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></title>
</head>
<body>
    <form id="form1" runat="server">
   <telerik:RadScriptManager runat="server" />
   
   <div id="content">
right click over me. There should be 3 items.<br />
right click over me. There should be 3 items.<br />
right click over me. There should be 3 items.<br />
right click over me. There should be 3 items.<br />
right click over me. There should be 3 items.<br />
   </div>

    <telerik:RadContextMenu runat="server" ID="ctxTest">
<ExpandAnimation Type="None" />
<CollapseAnimation Type="None" />
<Items>

<telerik:RadMenuItem Value="1" Text="item 1 of 3" />
<telerik:RadMenuItem Value="2" Text="item 2 of 3" />

<telerik:RadMenuItem Value="3">
<ContentTemplate>item 3 of 3</ContentTemplate>
</telerik:RadMenuItem>

</Items>
<Targets>
<telerik:ContextMenuElementTarget ElementID="content" />
</Targets>
</telerik:RadContextMenu>
    </form>
</body>
</html>








Boyan Dimitrov
Telerik team
 answered on 10 Nov 2014
3 answers
111 views
Hello,

I am using the control to replace a old control we made ourself and that have the same behaviour as this DropDownTree. I have suscceeded yto d pretty much everything I wanted. There is only one thing I want to do, I want all the node to collapse when the filter is empty.
I have tried several solutions, my closest one is this one, but is not working proprely. Sometimes it works, sometimes it does not :

I have attached to the DropDownTree OnClientLoad client side event this function :

function loadTreeView(sender, args) {
var dropdowntree1 = $find("<%=ddtList.ClientID%>");
var tree = dropdowntree1.get_embeddedTree();
$(".rddtFilterInput").keyup(function () {
if ($(".rddtFilterInput").val() == '')
treeCollapseAllNodes(tree);
}
 
I've tryed that too : $(".rddtFilterInput").on('input',function () {...}); But no success either...

I can see that it collapse the nodes but right after they are expanding again. 
I also tried to cancel the OnClientNodeExpanding event when the filter is empty but no success here either...

Do you have any solutions that realize what i'm trying to do ?

Thanks
Boyan Dimitrov
Telerik team
 answered on 10 Nov 2014
2 answers
110 views
I have an issue when trying to set up grouping in the code behind (vb.net) in that the data does not appear. 
If I set up the grouping on the aspx page the records show up.  
I have tried adding the datasource and databind before and after this code but I never get any records to appear.
I want to be able to dynamically turn certain grouping on or off depending on the user selection.
Can you tell me why the records are not showing up when I use the code behind page to create the grouping?   

        RadGrid1.MasterTableView.GroupByExpressions.Clear()
        Dim ShowFacilities As CheckBox = ctlOptions.FindControl("cbShowFacilities")
        If ShowFacilities.Checked Then
            Dim ge1 As New Telerik.Web.UI.GridGroupByExpression
            Dim gf1 As New Telerik.Web.UI.GridGroupByField
            gf1.FieldName = "Facility"
            gf1.HeaderValueSeparator = String.Empty
            gf1.HeaderText = "Facility - "
            ge1.SelectFields.Add(gf1)
            RadGrid1.MasterTableView.GroupByExpressions.Add(ge1)

            Dim ge2 As New Telerik.Web.UI.GridGroupByExpression
            Dim gf2 As New Telerik.Web.UI.GridGroupByField
            gf2.FieldName = "Name"
            gf2.HeaderValueSeparator = String.Empty
            gf2.HeaderText = "&nbsp;"
            ge2.SelectFields.Add(gf2)
            RadGrid1.MasterTableView.GroupByExpressions.Add(ge2)

        Else
            Dim ge2 As New Telerik.Web.UI.GridGroupByExpression
            Dim gf2 As New Telerik.Web.UI.GridGroupByField
            gf2.FieldName = "Name"
            gf2.HeaderValueSeparator = String.Empty
            gf2.HeaderText = "&nbsp;"
            ge2.SelectFields.Add(gf2)
            RadGrid1.MasterTableView.GroupByExpressions.Add(ge2)

        End If

RadGrid1.DataSource = MyDataSource
RadGrid1.DataBind

Patrick
Top achievements
Rank 1
 answered on 10 Nov 2014
5 answers
266 views
Hi all
I'm using radgrid in my website.
Im loading radgrid for radpanelbar in foue radpanel items which means one radgrid for one tab.
I'm refreshing the this page for every 15 secs ,every time on refresh.
So when I see the memoryusage of IE in taskmanager its keep on increasing for every 15 or 13 secs like that.
But I'm not loading any extra data on refresh.
Pls help me in this since this is considered as critical from my client.
and I have same issue in two pages.
Help me asap pls.
Pavlina
Telerik team
 answered on 10 Nov 2014
5 answers
110 views
Had the following example working fine to print contents of a Radwindow from the title bar:  http://www.telerik.com/support/kb/aspnet-ajax/window/details/adding-a-custom-button-to-radwindow-titlebar

However now using IE11 it prints the entire page behind the window as well.
In Firefox works fine and only prints the contents of the Radwindow.

Would appreciate and any.

Thanks

Glenn
Marin Bratanov
Telerik team
 answered on 10 Nov 2014
2 answers
134 views
Trying to limit the results that are returned to a FileExplorer and it works sporadically and quite possibly we are missing something.  If a file exists for a Credit Union it will display as it should however if there isn't one found it will return all the records in that folder (which we do not want).  After it shows all the files if I click the refresh button within the FileExplorer it will then show there are no results.  There is only two possible outcomes:

if a file exists for that credit union, show the file
if does not exist, show no files
Public Shared iASI_Num As Integer
 
    Public Shared Property GetAsiNum() As Integer
        Get
            Return iASI_Num
        End Get
        Set(ByVal value As Integer)
            iASI_Num = value
        End Set
    End Property
 
 
    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
 
 
    End Sub
 
    Protected Function GetVisibleControls() As Telerik.Web.UI.FileExplorer.FileExplorerControls
        Dim explorerControls As Telerik.Web.UI.FileExplorer.FileExplorerControls = 0
 
        explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.AddressBox
        explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.Grid
        explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.ListView
        explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.Toolbar
        explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.TreeView
        explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.ContextMenus
 
 
        Return explorerControls
    End Function
 
    Private Sub Page_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
        If Not String.IsNullOrEmpty(Session("ASI_Num")) Then
            If Session("asi_num") <> 0 Then
                iASI_Num = Session("ASI_Num")
 
                'set properties according to configuration panel
                FileExplorer1.Configuration.SearchPatterns = New String() {"*.pdf"}
                FileExplorer1.VisibleControls = GetVisibleControls()
                FileExplorer1.EnableOpenFile = True
                FileExplorer1.DisplayUpFolderItem = False
                FileExplorer1.AllowPaging = False
                FileExplorer1.EnableCreateNewFolder = False
                FileExplorer1.Configuration.AllowFileExtensionRename = False
                FileExplorer1.Upload.InitialFileInputsCount = 1
                FileExplorer1.Upload.MaxFileInputsCount = 1
 
                If (FileExplorer1.VisibleControls And Telerik.Web.UI.FileExplorer.FileExplorerControls.Grid) = 0 Then
                    FileExplorer1.ExplorerMode = Telerik.Web.UI.FileExplorer.FileExplorerMode.Thumbnails
                End If
 
                If (FileExplorer1.VisibleControls And Telerik.Web.UI.FileExplorer.FileExplorerControls.ListView) = 0 Then
                    FileExplorer1.ExplorerMode = Telerik.Web.UI.FileExplorer.FileExplorerMode.[Default]
                End If
 
                FileExplorer1.Configuration.UploadPaths = New String() {"~/PDF/ECPay"}
                FileExplorer1.Configuration.DeletePaths = New String() {"~/PDF/ECPay"}
 
                '#region assign-provider_vb
                FileExplorer1.Configuration.ContentProviderTypeName = GetType(ExtendedFileProvider).AssemblyQualifiedName
                '#endregion
 
            End If
        End If
    End Sub
End Class
 
Public Class ExtendedFileProvider
    Inherits Telerik.Web.UI.Widgets.FileSystemContentProvider
    Dim iAsi_Num As Integer = ECPayManagement.GetAsiNum
 
    'constructor must be present when overriding a base content provider class
    'you can leave it empty
    Public Sub New(ByVal context As HttpContext, ByVal searchPatterns As String(), ByVal viewPaths As String(), ByVal uploadPaths As String(), ByVal deletePaths As String(), ByVal selectedUrl As String, _
     ByVal selectedItemTag As String)
        MyBase.New(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, _
         selectedItemTag)
    End Sub
 
    Public Overloads Overrides Function ResolveDirectory(ByVal path As String) As Telerik.Web.UI.Widgets.DirectoryItem
        'get the directory information
        Dim baseDirectory As Telerik.Web.UI.Widgets.DirectoryItem = MyBase.ResolveDirectory(path)
        'remove files that we do not want to see
        Dim files As New System.Collections.Generic.List(Of Telerik.Web.UI.Widgets.FileItem)()
        For Each file As Telerik.Web.UI.Widgets.FileItem In baseDirectory.Files
            If IsFiltered(file.Name.ToString) Then
                files.Add(file)
            End If
        Next
        Dim newDirectory As New Telerik.Web.UI.Widgets.DirectoryItem(baseDirectory.Name, baseDirectory.Location, baseDirectory.FullPath, baseDirectory.Tag, baseDirectory.Permissions, files.ToArray(), _
         baseDirectory.Directories)
        'return the updated directory information
        Return newDirectory
    End Function
 
    Public Overrides Function StoreFile(file As Telerik.Web.UI.UploadedFile, path As String, name As String, ParamArray arguments As String()) As String
        Dim extension As String = name.Substring(name.LastIndexOf("."))
        name = iAsi_Num & extension 'put here your logic for getting the client id
 
        Return MyBase.StoreFile(file, path, name)
    End Function
 
    Private Function IsFiltered(name As String) As Boolean
        If name.ToString = CStr(iAsi_Num & ".pdf") Then
            Return True
        End If
        ' else
        Return False
    End Function
Vessy
Telerik team
 answered on 10 Nov 2014
1 answer
78 views
System.InvalidOperationException: Telerik.Web.UI.RadRating with ID='RadRating0' was unable to find an embedded skin with the name 'WebBlue'.
Slav
Telerik team
 answered on 10 Nov 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?