Inheritance: SortableCollectionBase, ICustomTypeDescriptor
Example #1
0
 public CellHelperCollectionPropertyDescriptor(CellHelperCollection coll, int idx)
     :
     base("#" + idx.ToString(), null)
 {
     this.collection = coll;
     this.index      = idx;
 }
 public CellHelperCollectionPropertyDescriptor(CellHelperCollection coll, int idx)
     : base("#" + idx.ToString(), null)
 {
     this.collection = coll;
     this.index = idx;
 }
Example #3
0
        private void CopySelectionToClipboard()
        {
            try
            {
                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);
            }
            catch (Exception E)
            {
                Console.WriteLine(E.Message);
            }
        }