简体   繁体   English

Kendo用户界面-上传按钮-自定义

[英]Kendo UI - Upload Button - Custom

I am using Kendo for the first time. 我是第一次使用剑道。

I'm using the Kendo Upload button: 我正在使用Kendo上传按钮:

                   @(Html.Kendo().Upload()
                            .Name("attachments")
                            .Async(async => async
                            .Save("UploadFiles", "Activity")

                            )
                    )

Does anyone know how to replace the standard "Select Files..." text with their own custom message. 有谁知道如何用自己的自定义消息替换标准的“选择文件...”文本。 An even better solution for me would be able to replace the content of the message with the following empty span: 对我来说,更好的解决方案是可以用以下空跨度替换消息的内容:

<span class="icon-attachment">

Any help would be appreciated. 任何帮助,将不胜感激。

Thanks, 谢谢,

At work we've been using Kendo all over the place recently. 在工作中,我们最近一直在各地使用剑道。 As mentioned by Patryk, the way in which Telerik expect you to amend a lot of their controls is using lambda expressions. 如Patryk所述,Telerik希望您修改许多控件的方式是使用lambda表达式。

For what you want to do, I'd recommend the following: 对于您想做的事情,我建议以下内容:

@(Html.Kendo().Upload()
   .Name("attachments")
   .Messages( m => m.Select("Here is my custom message"))
   .Async(async => 
       async.Save("UploadFiles", "Activity")
   )
)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM