예제 #1
0
        /// <summary>
        /// Returns the content of a cell at the given index.
        /// </summary>
        /// <param name="columnIndex">The zero-based index of the column in the row.</param>
        /// <returns></returns>
        public string GetContent(int columnIndex)
        {
            var content = mCellsParent.Value
                          .FindGeneric(SearchEx.ByClass(DevExpress.LightweightCellEditor).AndByIndex(columnIndex), depth: 1)
                          .FindGeneric(SearchEx.ByClass(
                                           $"regexp:({DevExpress.InplaceBaseEdit.Replace(".", "\\.")})|" +
                                           $"({typeof(TextBlock).FullName.Replace(".", "\\.")})"), depth: 2);

            try
            {
                return(content.Node.GetProperty <string>("DisplayText"));
            }
            catch (InvocationException)
            {
                return(content.Node.GetProperty <string>("Text"));
            }
        }
        /// <summary>
        /// Returns a table view representing the contents of the grid whose internal table view is running in optimized mode.
        /// </summary>
        /// <typeparam name="TRow">The type of rows returned by the table view.</typeparam>
        /// <param name="rowWrapper">A function that converts an "untyped" row to strongly-typed row.</param>
        /// <returns>A table view representing the contents of the grid.</returns>
        public TcOptimizedTableView <TRow> GetOptimizedTableView <TRow>(Func <TcOptimizedTableRow, TRow> rowWrapper)
        {
            var tableView = this.FindGeneric(SearchEx.ByClass(DevExpress.TableView), depth: 1);

            return(new TcOptimizedTableView <TRow>(tableView, rowWrapper));
        }
예제 #3
0
 public TcOptimizedTableRow()
 {
     mCellsParent = new Lazy <IControlObject>(() => this.FindGeneric(SearchEx.ByClass(DevExpress.CellsControl), depth: 1));
 }