예제 #1
0
 private void spreadsheetControl1_CustomCellEdit(object sender, SpreadsheetCustomCellEditEventArgs e)
 {
     if (e.ValueObject.IsText)
     {
         e.RepositoryItem = CreateCustomEditor(e.ValueObject.TextValue);
     }
 }
예제 #2
0
 void spreadsheetControl1_CustomCellEdit(object sender, SpreadsheetCustomCellEditEventArgs e)
 {
     if (!e.ValueObject.IsText)
     {
         return;
     }
     if (e.ValueObject.TextValue == "FOBSpinEdit")
     {
         e.RepositoryItem = CreateSpinEdit(0, 500, 5);
     }
     else if (e.ValueObject.TextValue == "TermsSpinEdit")
     {
         e.RepositoryItem = CreateSpinEdit(5, 30, 1);
     }
     else if (e.ValueObject.TextValue == "QtySpinEdit")
     {
         e.RepositoryItem = CreateSpinEdit(1, 100, 1);
     }
     else if (e.ValueObject.TextValue == "DiscountSpinEdit")
     {
         e.RepositoryItem = CreateSpinEdit(0, 1000, 10);
     }
     else if (e.ValueObject.TextValue == "ShippingSpinEdit")
     {
         e.RepositoryItem = CreateSpinEdit(10, 1000, 5);
     }
 }
        void OnCustomCellEdit(object sender, SpreadsheetCustomCellEditEventArgs e)
        {
            if (!e.ValueObject.IsText || unitOfWork == null)
            {
                return;
            }
            var editorInfo = CellsHelper.FindEditor(e.ValueObject.TextValue);

            if (editorInfo != null)
            {
                e.EditSettings = CreateSpinEditSettings(editorInfo.MinValue, editorInfo.MaxValue, editorInfo.Increment);
            }
        }
 private void spreadsheetControl1_CustomCellEdit(object sender, SpreadsheetCustomCellEditEventArgs e)
 {
     // Specify a type of the custom editor assigned to cells of the "Quantity" table column.
     // To identify the custom editor, use a value of ValueObject associated with it.
     if (e.ValueObject.IsText && e.ValueObject.TextValue == "MySpinEdit")
     {
         // Create a SpinEdit in-place editor and assign it to a cell.
         SpinEditSettings settings = new SpinEditSettings();
         settings.MinValue     = 1;
         settings.MaxValue     = 1000;
         settings.IsFloatValue = false;
         e.EditSettings        = settings;
     }
 }