zoukankan      html  css  js  c++  java
  • 异步调用WCF服务,并将数据填入GridLookUpEdit中

    #region 给GridLookUpEdit填入数据        

    private void GetgridLookUpData()       

      {           

      var service = new SIMUBUSINESSLOGICDATA.SRSYSTEMBPJDQOperatorService.BpjdqSystemOperatorSystemClient(WebServiceApp.NetTcpBinding(), WebServiceApp.BpjdqSystemEndpoingAddress());      

           service.Open();           

      service.BeginGetTDictionaryInfoList(delegate(IAsyncResult asResult)          

       {      

               if (asResult.IsCompleted)       

              {           

              _dictionarylist = service.EndGetTDictionaryInfoList(asResult);        

                 Invoke(new Action(() =>              

             {                       

          gridLookUpEdit1.Properties.View.OptionsBehavior.AutoPopulateColumns = false;        

                  this.gridLookUpEdit1.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;        

                  this.gridLookUpEdit1.Properties.View.BestFitColumns();

                  this.gridLookUpEdit1.Properties.ShowFooter = false;        

                  this.gridLookUpEdit1.Properties.View.OptionsView.ShowAutoFilterRow = false; //显示不显示grid上第一个空行,也是用于检索的应用    

                  this.gridLookUpEdit1.Properties.AutoComplete = false;              

                  this.gridLookUpEdit1.Properties.ImmediatePopup = true;                    

              this.gridLookUpEdit1.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;         

                  this.gridLookUpEdit1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; //配置,用于像文本框那样呀,可自己录入,选择,些处是枚举,可自行设置.

                  gridLookUpEdit1.Properties.NullText = "--请选择--";         

                  gridLookUpEdit1.Properties.ValueMember = "F_DictonaryName";   //相当于editvalue             

                  gridLookUpEdit1.Properties.DisplayMember = "F_DictonaryName";    //相当于text                   

                  gridLookUpEdit1.Properties.DataSource = _dictionarylist;    

                     }));             

        }         

        }, null);      

       }      

       #endregion

    You can reach me by surfing the web ---- huntjobs.cn,or sending e-mails to me,Here is my qq MailBox:1424870395@qq.com
  • 相关阅读:
    Lucence.Net 2.9.3 日期范围搜索
    Frida 使用
    ubuntu+php5fpm 下安装 memcached PHP扩展
    cmd下使用telnet连接到memcached服务器操作
    解决sendmail卡死和主机名为bogon的问题
    【转载】Win7文件关联 文件与程序“联姻”
    [转载]Ubuntu下Samba服务器的最简配置
    Windows XP快速关机
    [转载]Git安装以及使用Git 管理个人文档
    GitHub push时提示“fatal: The remote end hung up unexpectedly”
  • 原文地址:https://www.cnblogs.com/HedgehogBlog/p/3469669.html
Copyright © 2011-2022 走看看