private void ShowTextBoxField(int popTop, int popLeft, int objIndex, FastRow objRow)
        {
            var pop = new PopupTextBox(objRow.cells[objIndex].CellValue,
                                       lastHitColumn.ResultedWidth, CellHeight,
                                       lastHitRow,
                                       lastHitColumn,
                                       columnProperty[lastHitColumn], OnValueEntered);

            pop.Show(this, popLeft, popTop);
        }
Пример #2
0
 private void ShowTextBoxField(int popTop, int popLeft, int objIndex, FastRow objRow)
 {
     var pop = new PopupTextBox(objRow.cells[objIndex].CellValue,
                                lastHitColumn.ResultedWidth, CellHeight,
                                lastHitRow,
                                lastHitColumn,
                                columnProperty[lastHitColumn], OnValueEntered);
     pop.Show(this, popLeft, popTop);
 }
Пример #3
0
 // открытие стандартного редактора в зависимости от типа свойства
 private void OpenBaseEditor(PropertyInfo property, FastGrid.FastGrid fastGrid, int rowIndex, FastColumn col)
 {
     var coords = fastGrid.GetCellCoords(col, rowIndex);
     var blankRow = new FastPropertyGridRow();
     var cellValue =
         fastGrid.rows[rowIndex].cells[fastGrid.Columns.FindIndex(c => c.PropertyName == blankRow.Property(p => p.Value))].CellValue;
     var propType = property.PropertyType;
     if ((propType == typeof (bool) || propType.IsEnum))
     {
         var pop = new PopupListBox(cellValue, rowIndex, col, propType, UpdateObject, fastGrid);
         pop.ShowOptions(coords.X, coords.Y);
         return;
     }
     if ((propType == typeof (string) || Converter.IsConvertable(propType)))
     {
         // редактор подставляется в FastGrid.PopupTextBox
         try
         {
             var pop = new PopupTextBox(cellValue, col.ResultedWidth, fastGrid.CellHeight, rowIndex, col, property, null);
             pop.OnValueUpdated += UpdateObject;
             pop.Show(fastGrid, coords);
         }
         catch(Exception ex)
         {
             Logger.Error("FastPropertyGrid.OpenBaseEditor", ex);
         }
         return;
     }
 }