void Init() { if (null == _bindData) { _bindData = SharedLogic.GetBindSkillSchema(); } if (null == _rootXml) { _rootXml = new XElement(SharedLogic.KEYRoot); } SharedLogic.BindControl(this.combSkillType, SharedData.Instance.BindSkillSrcType(true)); this.gridList.AutoGenerateColumns = false; this.gridList.Columns.Clear(); var txtCol = new DataGridViewTextBoxColumn(); txtCol.DataPropertyName = SkillItemData.COLSkillId; txtCol.HeaderText = "技能Id"; txtCol.Width = 100; this.gridList.Columns.Add(txtCol); txtCol = new DataGridViewTextBoxColumn(); txtCol.DataPropertyName = SkillItemData.COLSkillCode; txtCol.HeaderText = "技能Code"; txtCol.Width = 100; this.gridList.Columns.Add(txtCol); txtCol = new DataGridViewTextBoxColumn(); txtCol.DataPropertyName = SkillItemData.COLSkillName; txtCol.HeaderText = "技能名称"; txtCol.Width = 120; this.gridList.Columns.Add(txtCol); var combCol = new DataGridViewComboBoxColumn(); combCol.DataSource = SharedData.Instance.BindSkillSrcType(); combCol.DisplayMember = BindItemData.COLText; combCol.ValueMember = BindItemData.COLCode; combCol.DataPropertyName = SkillItemData.COLSkillSrcType; combCol.HeaderText = "技能类型"; combCol.Width = 100; combCol.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing; this.gridList.Columns.Add(combCol); txtCol = new DataGridViewTextBoxColumn(); txtCol.DataPropertyName = SkillItemData.COLModelId; txtCol.HeaderText = "模型Id"; txtCol.Width = 80; this.gridList.Columns.Add(txtCol); txtCol = new DataGridViewTextBoxColumn(); txtCol.DataPropertyName = SkillItemData.COLOpenClipId; txtCol.HeaderText = "开场动画Id"; txtCol.Width = 80; this.gridList.Columns.Add(txtCol); txtCol = new DataGridViewTextBoxColumn(); txtCol.DataPropertyName = SkillItemData.COLClipId; txtCol.HeaderText = "释放动画Id"; txtCol.Width = 80; this.gridList.Columns.Add(txtCol); txtCol = new DataGridViewTextBoxColumn(); txtCol.DataPropertyName = SkillItemData.COLMemo; txtCol.HeaderText = "效果描述"; txtCol.Width = 360; this.gridList.Columns.Add(txtCol); this._bindData.DefaultView.Sort = SkillItemData.COLSkillCode; this.gridList.DataSource = _bindData.DefaultView; }