This is a migrated thread and some comments may be shown as answers.

Folder Change not working (Thumbnail View)

1 Answer 35 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Digant
Top achievements
Rank 1
Digant asked on 11 Mar 2014, 11:02 AM

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

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 13 Mar 2014, 02:17 PM
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.

 
Tags
FileExplorer
Asked by
Digant
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or