public async void GetActualWidthAndHeight()
        {
            if (!bvgGrid.HasMeasuredRect)
            {
                bvgGrid.bvgSize.W = await BVirtualGridCJsInterop.GetElementActualWidth(bvgGrid.DivContainerElementID);

                double top = await BVirtualGridCJsInterop.GetElementActualTop(bvgGrid.DivContainerElementID);

                double windowHeight = await BVirtualGridCJsInterop.GetWindowHeight();

                bvgGrid.bvgSize.H       = windowHeight - top - 30;
                bvgGrid.HasMeasuredRect = true;


                if (bvgGrid.bvgSettings.LayoutFixedOrAuto)
                {
                    if (bvgGrid.bvgSettings.CompWidth < bvgGrid.bvgSize.W)
                    {
                        bvgGrid.bvgSize.W = bvgGrid.bvgSettings.CompWidth;
                    }
                    if (bvgGrid.bvgSettings.CompHeight < bvgGrid.bvgSize.H)
                    {
                        bvgGrid.bvgSize.H = bvgGrid.bvgSettings.CompHeight;
                    }
                }
            }



            if (bvgGrid.bvgSize.H > bvgGrid.RowsTotalCount * bvgGrid.bvgSettings.RowHeight + bvgGrid.bvgSettings.HeaderHeight)
            {
                bvgGrid.bvgSize.H = bvgGrid.RowsTotalCount * bvgGrid.bvgSettings.RowHeight + bvgGrid.bvgSettings.HeaderHeight;
            }


            CheckSizeLimits();

            bvgGrid.AdjustSize();


            RestoreComponentReferences();


            RenderGridColumns(0, false);

            RenderGridRows(0, false);

            ActualRender = true;

            //EnabledRender = true;



            //bvgGrid.SelectCell(bvgGrid.Rows.First().Cells.First(), true);

            StateHasChanged();


            //EnabledRender = false;
        }
        public void SetScrollLeftToNonFrozenColumnsDiv(double p)
        {
            double p2 = p;

            if (LastHorizontalSkip > 0)
            {
                p2 -= bvgGrid.ColumnsOrderedListNonFrozen.Take(LastHorizontalSkip).Sum(x => x.ColWidth);
            }

            BVirtualGridCJsInterop.SetElementScrollLeft("NonFrozenDiv1", p2);
        }
Пример #3
0
 public void CheckboxClicked(MouseEventArgs e)
 {
     BVirtualGridCJsInterop.SetValueToCheckBox(string.Concat("chCell", bvgCell.ID), bvgCell.Value);
     bvgCell.bvgGrid.SelectCell(bvgCell, false);
 }