public void SelectCell(BvgCell <TItem> parCell, bool doFocus)
        {
            string oldActiveCellID = string.Empty;
            bool   IsSameRow       = false;

            if (ActiveBvgCell != null)
            {
                oldActiveCellID = ActiveBvgCell.ID;
                IsSameRow       = ActiveBvgCell.bvgRow.ID == parCell.bvgRow.ID;
            }


            ActiveBvgCell = parCell;

            ActiveCell = Tuple.Create(true, parCell.bvgRow.IndexInSource, parCell.bvgColumn.prop.Name);


            if (IsSameRow)
            {
                BvgJsInterop.SetAttributeBatch(new string[] { oldActiveCellID, "CDiv " + CellStyle.CS.ToString() }, "class");
            }
            else
            {
                SelectRow(parCell.bvgRow, true);
            }


            SelectActiveCell(false);

            if (doFocus)
            {
                ActiveCellFocus();
            }
        }
Exemple #2
0
        public void SelectCell(BvgCell parCell, bool doFocus)
        {
            ActiveCell   = parCell;
            ActiveRow    = parCell.bvgRow;
            ActiveColumn = parCell.bvgColumn;


            SelectActiveRow();
            SelectActiveCell(false);

            if (doFocus)
            {
                ActiveCellFocus();
            }
        }
        private void SelectColumn(BvgColumn <TItem> ActiveColumn)
        {
            Cmd_Clear_Selection();


            ActiveColumn.IsSelected = true;
            ActiveColumn.CssClass   = HeaderStyle.HeaderActive.ToString();

            foreach (var item in Rows)
            {
                BvgCell <TItem> c = item.Cells.Single(x => x.bvgColumn.ID == ActiveColumn.ID);

                c.IsSelected   = true;
                c.CssClassBase = CellStyle.CS.ToString();
                c.InvokePropertyChanged();
            }



            ActiveColumn.BSplitter.SetColor(bvgSettings.HeaderStyle.BackgroundColor);

            ActiveColumn.InvokePropertyChanged();
        }