public void GetClipboardContentTestException2() { DataGridViewRowHeaderClipboardCell cell = new DataGridViewRowHeaderClipboardCell(); using (DataGridView dgv = new DataGridView()) { DataGridViewColumn col = new DataGridViewColumn(); col.CellTemplate = new DataGridViewTextBoxCell(); dgv.Columns.Add(col); DataGridViewRow row = new DataGridViewRow(); row.HeaderCell = cell; dgv.Rows.Add(row); dgv.Rows [0].SetValues("abc"); dgv.Rows [0].Cells [0].Selected = true; cell = dgv.Rows [0].HeaderCell as DataGridViewRowHeaderClipboardCell; cell.GetClipboardContentPublic(2, false, false, false, false, "Text"); } }
public void GetClipboardContentTestException2 () { DataGridViewRowHeaderClipboardCell cell = new DataGridViewRowHeaderClipboardCell (); using (DataGridView dgv = new DataGridView ()) { DataGridViewColumn col = new DataGridViewColumn (); col.CellTemplate = new DataGridViewTextBoxCell (); dgv.Columns.Add (col); DataGridViewRow row = new DataGridViewRow (); row.HeaderCell = cell; dgv.Rows.Add (row); dgv.Rows [0].SetValues ("abc"); dgv.Rows [0].Cells [0].Selected = true; cell = dgv.Rows [0].HeaderCell as DataGridViewRowHeaderClipboardCell; cell.GetClipboardContentPublic (2, false, false, false, false, "Text"); } }