multirow如何动态的设置一个cell的type?
如题,假如一个Cell是number类型的,然后我想在代码中动态的改变number类型的某些属性。您好,写了个简单的例子,点击一下按钮,把TextBox的HighLightText属性修改。
this._gcMultiRow.Template = Template.CreateGridTemplate(new List<Cell>()
{
new TextBoxCell(),
});
this.Controls.Add(this._gcMultiRow);
var button = new Button();
button.Location = new Point(300, 300);
this.Controls.Add(button);
button.Click += (s, e) =>
{
var textBoxCell = this._gcMultiRow.Template.Row.Cells as TextBoxCell;
textBoxCell.HighlightText = true;
this._gcMultiRow.Template = this._gcMultiRow.Template;
};
页:
[1]