Exemplo n.º 1
0
        public void AddRow(ItemGridHeaderCell header, List <ItemGridDataCell> dataCells, ItemGridFooterCell footer)
        {
            ItemGridRow <dynamic> row = new ItemGridRow <dynamic>(this, _grid.Count, header, dataCells, footer);

            _grid.Add(row);
            //SoftRefresh();
        }
Exemplo n.º 2
0
        /// <summary>
        /// adds a row of ItemGridCells (or children).
        /// </summary>
        /// <param name="rowlist"></param>
        //public void AddRow(ItemGridHeaderCell headerCell, List<ItemGridDataCell> rowlist, ItemGridFooterCell footerCell = null)
        //{
        //    if (rowlist.IsNullOrEmpty() && footerCell == null )
        //    {
        //        throw new Exception("Row must contain at least one item or a footerCell included");
        //    }

        //    //create a list of ItemGridCell
        //    List<ItemGridCell> rowGridCells = new List<ItemGridCell>();
        //    rowGridCells.Add(headerCell); //populate with the header.
        //    rowGridCells.AddRange(rowlist); //populate with the datacells
        //    //if the footer cell was given, add the footer, else create a new footer and add that.
        //    if(footerCell != null)
        //        rowGridCells.Add(footerCell);
        //    else
        //        rowGridCells.Add(new ItemGridFooterCell(rowlist[0]));


        //    //add the row to the _grid.
        //    _grid.Add(rowGridCells);

        //    int x = 0;
        //    int y = _grid.Count -1;
        //    foreach (var cell in rowGridCells)
        //    {
        //        SetCellGridData(cell, x++, y);
        //    }
        //    //UpdateRow(_grid.Count -1);

        //}
        public void AddRow(ItemGridRow <dynamic> row)
        {
            _grid.Add(row);
        }