(Html.DevExtreme().FileUploader() dialogtrigger example 1

(Html.DevExtreme().FileUploader() dialogtrigger example



@(Html.DevExtreme().FileUploader()
    .DialogTrigger(new JS("myValue"))
)

Here is what the above code is Doing:
1. The DialogTrigger method accepts a JS object as a parameter.
2. The JS object accepts a string as a parameter.
3. The string is a JavaScript expression that returns a DOM element.
4. The DialogTrigger method uses the DOM element as a trigger for the file uploader’s dialog.

@section FileUploader_HowTo_Customize_the_File_Uploader_Dialog_Content_1 How to: Customize the File Uploader Dialog Content

The file uploader’s dialog is a standard DevExtreme dialog. You can customize it using the dxDialog widget.

@code
@(Html.DevExtreme().FileUploader()
.DialogOptions(new {
title = “Upload Files”,
buttons = new[] {
new {
text = “Upload”,
onClick = new JS(“function(e) { e.dialog.close(); }”)
},
new {
text = “Cancel”,
onClick = new JS(“function(e) { e.dialog.close(); }”)
}
}
})
)

@(Html.DevExtreme().FileUploader()
.DialogOptions(new {
title = “Upload Files”,
buttons = new[] {
new {
text = “Upload”,
onClick = new JS(“function(e) { e.dialog.close(); }”)
},
new {
text = “Cancel”,
onClick = new JS(“function(e) { e.dialog.close(); }”)
}
}
})
)

@(Html.DevExtreme().FileUploader()
.DialogOptions(new {
title = “Upload Files”,
buttons = new[] {
new {
text = “Upload”,
onClick = new JS(“function(e) { e.dialog.close(); }”)
},
new {
text = “Cancel”,
onClick = new JS(“function(e) { e.dialog.close(); }”)
}
}
})
)

@(Html.DevExtreme().FileUploader()
.DialogOptions(new {
title = “Upload Files”,
buttons = new[] {
new {
text = “Upload”,
onClick = new JS(“function(e) { e.dialog.close(); }”)
},
new {
text = “Cancel”,
onClick = new JS(“function(e) { e.dialog.close(); }”)
}
}
})
)

@(Html.DevExtreme().FileUploader()
.DialogOptions(new {
title = “Upload Files”,
buttons = new[] {
new {
text = “Upload”,
onClick = new JS(“function(e) { e.dialog.close(); }”)
},
new {
text = “Cancel”,
onClick = new JS(“function(e) { e.dialog.close(); }”)
}
}
})
)

@(Html.DevExtreme().FileUploader()
.DialogOptions(new {

Similar Posts