Example #1
0
 public CellHelperCollectionPropertyDescriptor(CellHelperCollection coll, int idx)
     :
     base("#" + idx.ToString(), null)
 {
     this.collection = coll;
     this.index      = idx;
 }
Example #2
0
 private void CopySelectionToClipboard()
 {
     DevExpress.XtraGrid.Views.Base.GridCell[] cellcollection = gridView1.GetSelectedCells();
     CellHelperCollection chc = new CellHelperCollection();
     foreach (DevExpress.XtraGrid.Views.Base.GridCell gc in cellcollection)
     {
         CellHelper ch = new CellHelper();
         ch.Rowhandle = gc.RowHandle;
         ch.Columnindex = gc.Column.AbsoluteIndex;
         object o = gridView1.GetRowCellValue(gc.RowHandle, gc.Column);
         if (m_viewtype == ViewType.Hexadecimal)
         {
             ch.Value = Convert.ToInt32(o.ToString(), 16);
         }
         else
         {
             ch.Value = Convert.ToInt32(o);
         }
         chc.Add(ch);
     }
     string serialized = ((int)m_viewtype).ToString();//string.Empty;
     foreach (CellHelper ch in chc)
     {
         serialized += ch.Columnindex.ToString() + ":" + ch.Rowhandle.ToString() + ":" + ch.Value.ToString() + ":~";
     }
     
     Clipboard.SetText(serialized);
 }
 public CellHelperCollectionPropertyDescriptor(CellHelperCollection coll, int idx)
     : base("#" + idx.ToString(), null)
 {
     this.collection = coll;
     this.index = idx;
 }