Exemple #1
0
        private void SetupReadOnlyGridControl(string gridUiDefName)
        {
            ReadOnlyGridControl                       = _controlFactory.CreateReadOnlyGridControl();
            ReadOnlyGridControl.Height                = 300;
            ReadOnlyGridControl.Buttons.Visible       = false;
            ReadOnlyGridControl.FilterControl.Visible = false;
            IClassDef classDef = ClassDef.Get <TBusinessObject>();

            if (!string.IsNullOrEmpty(gridUiDefName))
            {
                ReadOnlyGridControl.Initialise(classDef, gridUiDefName);
            }

            AddGridSelectionEvent();
            ReadOnlyGridControl.DoubleClickEditsBusinessObject = false;
        }
 private void SetupReadOnlyGridControl(string gridUiDefName)
 {
     _readOnlyGridControl       = _controlFactory.CreateReadOnlyGridControl();
     _readOnlyGridControl.Width = 300;
     _readOnlyGridControl.Grid.RowHeadersWidth  = 25;
     _readOnlyGridControl.Buttons.Visible       = false;
     _readOnlyGridControl.FilterControl.Visible = false;
     //ClassDef classDef = (ClassDef) _businessObject.ClassDef;
     if (!string.IsNullOrEmpty(gridUiDefName))
     {
         _readOnlyGridControl.Initialise(_classDef, gridUiDefName);
         int width = GetGridWidthToFitColumns(_readOnlyGridControl.Grid) + 2;
         if (width < 300)
         {
             _readOnlyGridControl.Width = width;
         }
     }
     _readOnlyGridControl.DoubleClickEditsBusinessObject = false;
 }