Ejemplo n.º 1
0
        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");
            }
        }
Ejemplo n.º 2
0
		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");

			}
		}