Hi Jialing,
Greetings from Syncfusion support.
We have validated your requirement in FileManager component. Please find the below details for your queries.
Query 1: Click event for custom column in detail view
You can add a button in column template and include click event for that button through fileLoad event in FileManager component. Please refer to the below code snippet.
|
fileLoad(args) {
// Check the FileManager view
if (args.module == "DetailsView") {
// Click event for button component
args.element.querySelector(".e-btn").onclick = args => {
alert("event triggered");
};
}} |
Query 2: Ability to use variables/function
We are unable to understand the requirement. Please clear the term “ability to use variables/function define in my component” mentioned in your update. Whether you want to use the variable/function declared outside FileManager component within the FileManager template.
Query 3: Hidden attribute for custom column
We need some more additional details to understand your exact requirement. Whether you want to hide the entire column in the FileManager. Please share us your tried out code blocks.
Query 4: Conditional column style
You can include your own custom style for a specific column in details view by using the class name of that column. We have customized the background color of a specific column in a button click.
|
public customStyle() {
// Added custom style for a specific column.
var column = document.querySelectorAll(".e-date");
for (var i = 0; i < column.length; i++) {
var classList = document.getElementsByClassName("e-date")[i].classList;
if (classList.contains("e-custom")) {
classList.remove("e-custom");
} else {
classList.add("e-custom");
}
}
} |
Please find the sample demonstrating the solution.
Refer to the below links to know more about File Manager component.
Please let us know if you need any further assistance.
Regards,
Indhumathy L