Folder Change not working (Thumbnail View)

2 posts, 0 answers
  1. Digant
    Digant avatar
    13 posts
    Member since:
    Dec 2013

    Posted 11 Mar 2014 Link to this post


    Hello All,


    I am using file explorer control
    i getting following issue


    I have bind "list view" in "page_load" 
    you can see code below

    //////////////////////////////////////////////////////////////

    ExpDocument.FileList.ListView.ClientSettings.DataBinding.ItemTemplate = @"<li class=""rfeThumbList rlvI"" >
                <a href=""javascript: void 0;"" class=""rfeLink rlvDrag  data-index=""#= index #"" title="""">
                    <span class=""rfeFile#= Telerik.Web.UI.FileExplorerHelper.isWebImage(item.Extension) ? ' rfeImageFile' : '' #"">
                    # if(Telerik.Web.UI.FileExplorerHelper.isWebImage(item.Extension)) {#
                        <img src=""#= item.Url || item.Path # "" alt="""" width=""32"" height=""32"" onclick=""OnFileOpen(this,'#= item.Path #')"" />
                    # }
                    else if(item.Extension=="".msg"") { #
                        <img src=""../Images/imgEnvelopeIcon.png"" alt="""" width=""32"" height=""32"" onclick=""OnFileOpen(this,'#= item.Path #')"" />
                    # }
                    else { #
                        <span class=""rfeFileIcon #= Telerik.Web.UI.FileExplorerHelper.getThumbnailCSSExtension(item) #"" ></span>
                    # } #
                    </span>
                    <span class=""rfeThumbTitle"" onclick=""OnFileOpen(this,'ModifyPage')"">#= Name #</span>
                </a>
            </li>";


    /////////////////////////////////////////////////////////////


    when i use above code to bind list view

    issue =>i can not change folder or double click any folder can not load that folder
    from thumbnail.
    but i can change folder from grid view so can you please help me.how can i change folder and i have to bind list view in page_load please suggest other solution

    Note- If  i don't change list view bind code than it works fine
  2. Vessy
    Admin
    Vessy avatar
    1383 posts

    Posted 13 Mar 2014 Link to this post

    Hello Digant,

    The experienced issue is caused by the fact you are setting "rlvDrag" class on every link, while in the original template it should be set depending on the selection of the item. Adding the bellow highlighted code to your template should fix the issue:
    ExpDocument.FileList.ListView.ClientSettings.DataBinding.ItemTemplate =
    @"<li class=""rfeThumbList rlvI"" >
        <a href=""javascript: void 0;"" class=""rfeLink rlvDrag#= isSelected ? ' rfeSelectedLink' : ''#"" data-index=""#= index #"" title="""">
            <span class=""rfeFile#= Telerik.Web.UI.FileExplorerHelper.isWebImage(item.Extension) ? ' rfeImageFile' : '' #"">
            # if(Telerik.Web.UI.FileExplorerHelper.isWebImage(item.Extension)) {#
                <img src=""#= item.Url || item.Path # "" alt="""" width=""32"" height=""32"" onclick=""OnFileOpen(this,'#= item.Path #')"" />
            # }
            else if(item.Extension=="".msg"") { #
                <img src=""../Images/imgEnvelopeIcon.png"" alt="""" width=""32"" height=""32"" onclick=""OnFileOpen(this,'#= item.Path #')"" />
            # }
            else { #
                <span class=""rfeFileIcon #= Telerik.Web.UI.FileExplorerHelper.getThumbnailCSSExtension(item) #"" ></span>
            # } #
            </span>
            <span class=""rfeThumbTitle"" onclick=""OnFileOpen(this,'ModifyPage')"">#= Name #</span>
        </a>
    </li>";

    I hope this helps.

    Regards,
    Vessy
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top