在Winform中下拉框绑定的时候只能读到text属性值,Id的值不管怎么搞都读取不到,所以就百度找到了一种方式: public void CmdBind() { var data = _logic.GetCurrency();//数据源 if (!data.Any()) return; foreach (var currency in data) { cmdCurrencyName.Items.Add(new CurrencyItem { CurrencyName = currency.Des
/*******步骤有四个,缺一不可*********/ function () {xxxxxx = Ext.extend(construct, {InitControl: function () { var _this = this; /*****************步骤一:建数据store ******************/ //一级下拉框数据(此处注意,一定要把store写在combobox控件定义的前面,否则无法加载数据) var moduleStore = new Ext.da
List<Site> list = new List<Site>(); foreach (DataRow srcDr in srcDt.Rows) { list.Add(new Site { Text = srcDr["SiteName"].ToString(), Value = (int)srcDr["SiteId"],Identifier = srcDr["identifier"].ToString() }); } C