zoukankan      html  css  js  c++  java
  • C#DevExpressHow to get value from the control inside DropDownWindowTemplate

    ASPxDropDownEdit - How to get value from the control inside DropDownWindowTemplate

    Tags:

    Juan C. Silva Yepes7 years ago

      • Hello,

        How can get a value of the DropDownWindowTemplate of the ASPxDropDownEdit Control.
        The control into DropDownWindowTemplate is a ASPxMemo.
        Thanks,
        Juan Carlos Silva Yepes

    •  
    • Mike (DevExpress Support)7 years ago

      Hello,
      Would you please clarify some extra information about your scenario?
      - Where (on the server side or client side) do you want to perform this operation?
      - Provide me with the markup and code of the mentioned ASPxDropDownEdit control and its template.
      This information will allow me to provide you with a precise solution.

    • Juan C. Silva Yepes7 years ago

      Hello Mike,
      Here attached test project and a video which shows the case discussed.
      Thanks,
      Juan Carlos Silva Yepes

      DropDownTemplate.rar

    Leave a Comment

    1 Solution

    Larry (DevExpress Support)7 years ago

    ​​​​​​​

    Hello Juan Carlos,
    Thank you for providing your project. When you are using the ASPxDropDownEdit, it is necessary to synchronize values of the editors inside DropDownWindowTemplate with the ASPxDropDownEdit's value. You can implement this by using the following code:

    
     

    [ASPx]

    <dx:ASPxDropDownEdit ID="ASPxDropDownEdit1" runat="server" ReadOnly="true" ClientInstanceName="dde"> <DropDownWindowTemplate> <dx:ASPxMemo ID="ASPxMemo1" runat="server" Height="71px" Width="170px"> <ClientSideEvents TextChanged="function(s, e) { dde.SetText(s.GetText()); }" /> </dx:ASPxMemo> </DropDownWindowTemplate> </dx:ASPxDropDownEdit>

    This way, you can get the ASPxDropDownEdit's value either on the server or client side. In addition, if you want to get a reference to the controls inside DropDownWindowTemplate, use the ASPxDropDownEdit.FindControl method:

    [C#]

    ASPxMemo memo = ASPxDropDownEdit1.FindControl("ASPxMemo1") as ASPxMemo;

    Attached is the modified project. Please let me know if you need further assistance.

  • 相关阅读:
    C#中自动增量字段值的获取方法
    Mio改造第一步
    酒后
    阳朔自驾行-行程篇
    如何在C#中获取新插入的identity列值
    格格生了
    扯皮
    nPdl的翻译
    asp.net和asp的互相调用
    NetBPM前进了一步,解决了上一个问题
  • 原文地址:https://www.cnblogs.com/grj001/p/12223911.html
Copyright © 2011-2022 走看看