$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
FileManager Client Side Event in ASP.NET
Home > How to > FileManager Client Event

FileManager is one of the controls that make up the Kettic ASP.NET AJAX UI suite. After integrating this component into your user interface designing project, developers will find it has never been so easy to add file management function to your pages. In this user manual, we will show you some of the client side events which you can use so that your users can organize and control file folders with ease.
OnCilentFolderLoaded: This is a server side property which can handle client side events. This property can be applied to set the name of the javascript function called when a user is trying to select an item in the grid. OnClientFileOpen: This is another commonly used property for client side events. You can use this property to set the name of the javascript function that is called when the user attempts to open a file by double clicking in the tree or in the grid.
OnClientItemSelected: This property is generally used to set the name of the javascript function that is called when a user tries to select an item in the grid. You can get a demo for this client side event from the javascript sample codes below.
OnClientFolderChange: Generally speaking, this client side event is also used to set the name of the javascript that is called when the selected folder in the grid / tree is changed or altered.
OnClientDelete: When a user is trying to delete / remove an item, or file / folder, etc, you can apply this client side event to set the name of the javascript which is fired.
OnClientCreatNewFolder: This property will definitely be used a lot because it is applied to set the name of the javascript that is called when you are trying to create a new folder.
OnClientMove: Using this property, you can instantly set the name of the javascript that is called when you or your user tries to rename a folder or just move it to somewhere else.
OnClientLoad: Different from the OnClientFolderLoaded property, which is used to set name of the javascript called for folder loading, this property is used to set name for the javascript called for control loading in the browser.
OnClientCopy: You can apply this property to easily set the name for the javascript that is loaded when a user tries to copy an item from the grid or tree.
Here is a simple demo with javascript codes for the client side events introduced above:
function OnClientFolderLoaded(sender, args) {
LogEvent("Grid folder loaded: " + args.get_item().get_name());
function OnClientFileOpen(sender, args) {
LogEvent("Item open: " + args.get_item().get_name());
function OnClientItemSelected(sender, args) {
LogEvent("Item click: " + args.get_item().get_name());
function OnClientFolderChange(sender, args) {
LogEvent("Tree folder change: " + args.get_item().get_name());
function OnClientDelete(sender, args) {
LogEvent("Delete: " + args.get_item().get_name());
function OnClientCreateNewFolder(sender, args) {
LogEvent("Create new folder: " + args.get_newPath());
function OnClientMove(sender, args) {
LogEvent("Item moved to: " + args.get_newPath());
function OnClientLoad(sender, args) {
LogEvent("File Explorer loaded!");

function OnClientCopy(sender, args) {
// args.set_cancel(true);
var destinationDirectoryPath = args.get_newPath();
LogEvent(String.format("Item is copying to {0}", destinationDirectoryPath));

function LogEvent(text) {
var d = new Date();
var dateStr = d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds() + "." + d.getMilliseconds();
var eventConsole = $get("eventConsole");
eventConsole.innerHTML += "[" + dateStr + "] " + text + "<br/>";