DevEx preSS:如何获得控制客户端的一个实例并访问其客户端的成员? [英] DevExpress: How do get an instance of a control client-side and access its client-side members?
问题描述
我从DexEx preSS一个DateEdit控制需要从它使用JavaScript获取日期值。从概念上讲,我期待这样的事情:
I have a DateEdit control from DexExpress and need to get the date value from it using Javascript. Conceptually, I am looking for something like this:
变种D = $(dpEndDate)GETDATE();
他们的API参考表明.GetDate()是一个成员,但我只需要知道如何获取包含此成员对象的客户端实例。
Their API reference indicates that .GetDate() is a member, but I just need to know how to acquire a client-side instance of the object that contains this member.
推荐答案
有必要指定ClientInstanceName财产(为ASP.NET的WebForms)和名称属性(对于ASP.NET MVC),以使能控制的客户端的编程对象:
It is necessary to specify the ClientInstanceName property (for the ASP.NET WebForms) and the "Name" property (for the ASP.NET MVC) to enable control’s client-side programmatic object:
<dx:ASPxDateEdit ... ClientInstanceName="de">
</dx:ASPxDateEdit>
var date = de.GetDate();
这篇关于DevEx preSS:如何获得控制客户端的一个实例并访问其客户端的成员?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!