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.

  • 相关阅读:
    MS SQL数据库在FAT32格式下数据大小不能超过4G
    屏蔽五项功能 让Windows XP极速狂飙
    FastReport安装
    电脑总是死机
    Win XP控制台命令详解
    一个人独自去看海
    my best love lover
    我的第一个blog
    我的学习生涯
    Codeforces Round #323 (Div. 2) C. GCD Table
  • 原文地址:https://www.cnblogs.com/grj001/p/12223910.html
Copyright © 2011-2022 走看看