Search results

Apply condition based hyperlink for specific row or column in ASP.NET Core Pivot Grid control

14 Oct 2021 / 1 minute to read

You can apply conditions for specific row or column using label option to show hyperlink option in the pivot grid. It can be configured using the conditionalSettings option through code behind, during initial rendering. The required settings are:

  • label: Specifies the header name to get visibility of hyperlink option for row or column.
  • condition: Specifies the operator type such as equals, greater than, less than, etc.
  • value1: Specifies the start value.
  • value2: Specifies the end value.
Copied to clipboard
<ejs-pivotview id="PivotGrid" height="300">
    <e-datasource data="" expandAll="false">
            <e-field name="Country" items="@ViewBag.countryMembers"></e-field>
            <e-field name="Year" items="@ViewBag.yearMembers"></e-field>
            <e-field name="Country"></e-field>
            <e-field name="Products"></e-field>
            <e-field name="Year" caption="Production Year"></e-field>
            <e-field name="Quarter"></e-field>
            <e-field name="Sold" caption="Units Sold"></e-field>
            <e-field name="Amount" caption="Sold Amount"></e-field>
            <e-format label="Germany" conditions="Between" value1="500"></e-format>
Copied to clipboard
public ActionResult Index()
    var data = GetPivotData(); = data;
    ViewBag.yearMembers = new string[] { "FY 2015" };
    ViewBag.countryMembers = new string[] { "France" };
    return View();