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.

  • 相关阅读:
    百万级数据库优化方案
    MySQL架构及优化原理
    性能优化建议
    索引
    sql语句优化(持续更新)
    sql语句优化原理
    常用命令
    常见问题
    三、范围和生命周期
    【UVa】[11582]Colossal Fibonacci Numbers!
  • 原文地址:https://www.cnblogs.com/grj001/p/12223910.html
Copyright © 2011-2022 走看看