view

Gets or sets the view of the FileManager.

Parameters

view String (optional)

The name of the view.

Returns

String The current view.

Example

<div id="fileManager"></div>
<script>
    var myData = [{
        name: "Folder",
        isDirectory: true,
        hasDirectories: false,
        path: "folder",
        extension: "",
        size: 0,
        createdUtc: new Date(),
        items: [
            {
                name: "Image.jpg",
                isDirectory: false,
                hasDirectories: false,
                path: "folder/Image.jpg",
                extension: ".jpg",
                size: 20,
                createdUtc: new Date(),
            },
            {
                name: "Image2.jpg",
                isDirectory: false,
                hasDirectories: false,
                path: "folder/Image2.jpg",
                extension: ".jpg",
                size: 20,
                createdUtc: new Date(),
            }
        ]}
    ];

    $("#fileManager").kendoFileManager({
        dataSource: myData
    });

    var fileManager = $("#fileManager").data("kendoFileManager");

    fileManager.view("grid");
</script>
In this article