Search results

Pane content

This section explains how to provide plain text content or HTML markup or integrate other Syncfusion ASP.NET MVC UI controls as content of splitter.

HTML Markup

Splitter is a layout based container control. You can render the pane contents from existing HTML markups. Converting HTML markup as splitter pane is easy way to add the panes content dynamically.

razor
controller.cs
@Html.EJS().Splitter("splitter").Width("600px").Height("200px").PaneSettings(item => {
   item.Size("200px").Content("<div class='content'><h4 class='h4'>PARIS </h4>Paris, the city of lights and love - this short guide is full of ideas for how to make the most of the romanticism...</div>").Add();
   item.Size("200px").Content("<div class='content'><h4 class='h4'>CAMEMBERT </h4>The village in the Orne département of Normandy where the famous French cheese is originated from.</div>").Add();
   item.Size("200px").Content("<div class='content'><h4 class='h4'>GRENOBLE </h4>The capital city of the French Alps and a major scientific center surrounded by many ski resorts, host of the Winter Olympics in 1968.</div>").Add();
}).Render()
<style>
    .content {
        padding: 9px;
    }

    .h4 {
        font-weight: 550;
    }
</style>
public class HomeController : Controller
{
    public ActionResult Index()
    {
        return View();
    }
}

Output be like the below.

HTML markup

Syncfusion ASP.NET MVC UI controls

You can render any Syncfusion ASP.NET MVC UI controls along with their native and control events within splitter as pane content.

You can refer Accordion within splitter and Listview within splitter samples.

Plain content

You can add the plain text as a pane contents using either inner HTML or Content API.

razor
controller.cs
@Html.EJS().Splitter("splitter").Width("600px").Height("200px").PaneSettings(item => {
   item.Size("200px").Content("<div class='content'>Left pane</div>").Add();
   item.Size("200px").Content("<div class='content'>Middle pane</div>").Add();
   item.Size("200px").Content("<div class='content'>Right pane</div>").Add();
}).Render()

<style>
    .content {
        text-align: center;
        align-items: center;
        justify-content: center;
        display: grid;
        height: 100%;
    }
</style>
public class HomeController : Controller
{
    public ActionResult Index()
    {
        return View();
    }
}

Output be like the below.

Plain content