RT有什么方法呢? 或者指条明路也行, 谢了

解决方案 »

  1.   

    扩展DataGridViewColumn和DataGridViewCell,DataGridView现有的列列类型有六种:DataGridViewTextBoxColumn ,DataGridViewButtonColumn ,DataGridViewComboBoxColumn ,
    DataGridViewImageColumn ,DataGridViewLinkColumn ,DataGridViewCheckBoxColumn 。
    你可以扩展你自己需要的如:DataGridViewTreeColumn,DataGridViewTreeCell,给个示范:public class CalendarCell : DataGridViewTextBoxCell
    {    public CalendarCell()
            : base()
        {
            // Use the short date format.
            this.Style.Format = "d";
        }    public override void InitializeEditingControl(int rowIndex, object 
            initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle)
        {
            // Set the value of the editing control to the current cell value.
            base.InitializeEditingControl(rowIndex, initialFormattedValue, 
                dataGridViewCellStyle);
            CalendarEditingControl ctl = 
                DataGridView.EditingControl as CalendarEditingControl;
            ctl.Value = (DateTime)this.Value;
        }    public override Type EditType
        {
            get
            {
                // Return the type of the editing contol that CalendarCell uses.
                return typeof(CalendarEditingControl);
            }
        }    public override Type ValueType
        {
            get
            {
                // Return the type of the value that CalendarCell contains.
                return typeof(DateTime);
            }
        }    public override object DefaultNewRowValue
        {
            get
            {
                // Use the current date and time as the default value.
                return DateTime.Now;
            }
        }
    }
      

  2.   

    不知道你用的是什么?如果是2.0的话的话,用GridView就解决了
      

  3.   

    对了,那个GridView 在WinForm下直接就可以显示树,Web下要加个控件,现在不再自己机子上,忘了名字,但不难,集成好的十分方便