2014-11-09 55 views
0

我加入兩列GridView如下添加多個控件的GridView列在Windows窗體應用程序

  DataGridViewLinkColumn Editlink = new DataGridViewLinkColumn(); 
      Editlink.UseColumnTextForLinkValue = true; 
      Editlink.HeaderText = "Edit"; 
      Editlink.DataPropertyName = "lnkColumn"; 
      Editlink.LinkBehavior = LinkBehavior.SystemDefault; 
      Editlink.Text = "Edit"; 
      dataGridView1.Columns.Add(Editlink); 

      DataGridViewLinkColumn Deletelink = new DataGridViewLinkColumn(); 
      Deletelink.UseColumnTextForLinkValue = true; 
      Deletelink.HeaderText = "delete"; 
      Deletelink.DataPropertyName = "lnkColumn"; 
      Deletelink.LinkBehavior = LinkBehavior.SystemDefault; 
      Deletelink.Text = "Delete"; dataGridView1.Columns.Add(Deletelink); 

我可以添加同一列中兩個按鈕?

回答

相關問題