Features

Auto Filling

Auto Filling

FlexSheet supports filling the forward selecting cells base on the values of selected cells.

Features

Auto Filling

This page show the demo of Auto Filling feature, to use this feature, set AllowAutoFill property to True.
The following sample use the events AutoFilling and AutoFilled to calculate sum of numbers in the filled range and also style the filled cells.

Please move pointer to right-bottom corner of the selection, when the pointer look like "cross-icon" then press down and drag for filling.
Filling range :
    Sum before filling:
    Sum after filling:
using Microsoft.AspNetCore.Mvc;

namespace FlexSheetExplorer.Controllers
{
    public partial class FlexSheetController : Controller
    {
        public ActionResult AutoFilling()
        {
            return View();
        }
    }
}
@section Scripts{
    <script type="text/javascript" src="~/Scripts/flexSheet/autoFilling.js"></script>
}
<div>
    <div class="copy">
        <h3>@Html.Raw(FlexSheetRes.AutoFilling_Text1)</h3>
        <p>
            @Html.Raw(FlexSheetRes.AutoFilling_Text2)
        </p>
    </div>
    <span style="color:gray">@Html.Raw(FlexSheetRes.AutoFilling_Text3)</span>
    <div id="fillingState">
        @Html.Raw(FlexSheetRes.AutoFilling_Text4) <span></span>:
        <br>&nbsp;&nbsp;&nbsp;&nbsp;@Html.Raw(FlexSheetRes.AutoFilling_Text5) <span></span>
        <br>&nbsp;&nbsp;&nbsp;&nbsp;@Html.Raw(FlexSheetRes.AutoFilling_Text6) <span></span>
    </div>
    <div>
        <c1-flex-sheet id="autoFillSheet" class="flexSheet" allow-auto-fill="true" auto-filling="_onAutoFilling" auto-filled="_onAutoFilled">
            <c1-unbound-sheet row-count="18" column-count="12"></c1-unbound-sheet>
        </c1-flex-sheet>
    </div>
</div>
@section Summary{
    <p>@Html.Raw(FlexSheetRes.AutoFilling_Text0)</p>
}