Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge filemanager-tables-2805 into production #2808

Merged
merged 1 commit into from
Mar 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions components/filemanager/data-binding/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,46 +231,46 @@ The above model properties have the following meaning for the FileManager:
@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)

| Property | Description |
|----------|----------|----------|
| --- | --- |
| **Item features** | |
| `Name` | The name of the file.
| `Size` | The size of the file.
| `Path` | The path of the file.
| `Extension` | The extension of the file.
| `IsDirectory` | Whether the item is a directory. If its value is `false` the item is considered a file and not a directory.
| `DateCreated` | The creation date of the file.
| `DateCreateUtc` | The creation date of the file in UTC. Required.
| `DateModified` | The modification date of the file.
| `DateModifiedUtc` | The modification date of the file in UTC. Required.
| `Name` | The name of the file. |
| `Size` | The size of the file. |
| `Path` | The path of the file. |
| `Extension` | The extension of the file. |
| `IsDirectory` | Whether the item is a directory. If its value is `false` the item is considered a file and not a directory. |
| `DateCreated` | The creation date of the file. |
| `DateCreateUtc` | The creation date of the file in UTC. Required. |
| `DateModified` | The modification date of the file. |
| `DateModifiedUtc` | The modification date of the file in UTC. Required. |
| **Item relations** | |
| `Id `| The unique identifier of the file. Required for [**binding to flat data**](slug:filemanager-data-binding-flat-data).
| `ParentId` | Identifies the file's parent. Required for [**binding to flat data**](slug:filemanager-data-binding-flat-data). Set to `null` for root items. Do *not* use `ParentId` with hierarchical data.
| `HasDirectories` | Determines whether the item has subdirectories. Required for binding to [**flat data**](slug:filemanager-data-binding-flat-data) If `true`, the directory will show an expand arrow. With [**hierarchical data**](slug:filemanager-data-binding-hierarchical-data), the FileManager renders expand icons based on `Directories`, but `HasDirectories` will take precedence.
| `Id `| The unique identifier of the file. Required for [**binding to flat data**](slug:filemanager-data-binding-flat-data). |
| `ParentId` | Identifies the file's parent. Required for [**binding to flat data**](slug:filemanager-data-binding-flat-data). Set to `null` for root items. Do *not* use `ParentId` with hierarchical data. |
| `HasDirectories` | Determines whether the item has subdirectories. Required for binding to [**flat data**](slug:filemanager-data-binding-flat-data) If `true`, the directory will show an expand arrow. With [**hierarchical data**](slug:filemanager-data-binding-hierarchical-data), the FileManager renders expand icons based on `Directories`, but `HasDirectories` will take precedence. |
| `Directories` | Defines the item subdirectories. Required for [binding to **hierarchical data**](slug:filemanager-data-binding-hierarchical-data).
| `Items` | Defines all the subitems (directories and files) of the item.
| `Items` | Defines all the subitems (directories and files) of the item. |

## Data Bindings

All [FileManager item features](#fileManager-item-features) map to model properties. The properties of a treeview item match directly to a field of the model the treeview is bound to. You provide that relationship by providing the name of the field from which the corresponding information is to be taken. To do this, in the main `TelerikFileManager` tag, use the parameters described below:

| FileManager Parameter | DEFAULT VALUE |
|----------|----------|----------|
| FileManager Parameter | Default Value |
| --- | --- |
| **Item features** | |
| `NameField`| `"Name"`
| `SizeField`| `"Size"`
| `PathField`| `"Path"`
| `ExtensionField`| `"Extension"`
| `IsDirectoryField`| `"IsDirectoryField"`
| `DateCreatedField`| `"DateCreated"`
| `DateCreateUtcField`| `"DateCreateUtc"`
| `DateModifiedField`| `"DateModified"`
| `DateModifiedUtcField`| `"DateModifiedUtc"`
| **Item relations** | || **Item relations** | |
| `IdField `| `"Id" `
| `ParentIdField`| `"ParentId"`
| `HasDirectoriesField`| `"HasDirectories"`
| `DirectoriesField`| `"Directories"`
| `EntriesField`| `"Entries"`
| `NameField`| `"Name"` |
| `SizeField`| `"Size"` |
| `PathField`| `"Path"` |
| `ExtensionField`| `"Extension"` |
| `IsDirectoryField`| `"IsDirectoryField"` |
| `DateCreatedField`| `"DateCreated"` |
| `DateCreateUtcField`| `"DateCreateUtc"` |
| `DateModifiedField`| `"DateModified"` |
| `DateModifiedUtcField`| `"DateModifiedUtc"` |
| **Item relations** | |
| `IdField `| `"Id" ` |
| `ParentIdField`| `"ParentId"` |
| `HasDirectoriesField`| `"HasDirectories"` |
| `DirectoriesField`| `"Directories"` |
| `EntriesField`| `"Entries"` |

>important Do not use `ParentId` with hierarchical data. This will confuse the FileManager that it is bound to flat data and the component may not render any items. If the model must have a `ParentId` property, set `ParentIdField` to a non-existent property.

Expand Down