Gauges (Sliders)

In addition to the InputNumber control, you can use gauges to display and edit numbers.

Although they are normally used in dashboard-style applications to display numeric data, C1 MVC gauges have an isReadOnly property that allows you to use them as input controls, much like the HTML input range element.

Gauge controls are similar to HTML input range elements, but with some advantages:

  1. Gauges have a consistent look among browsers. Input range elements look different depending on the browser.
  2. Gauges can be styled using CSS, and customized with a rich set of properties.
1
2
3
4
5
6
7
8
9
10
11
12
13
using System.Web.Mvc;
 
namespace LearnMvcClient.Controllers
{
    public partial class C1InputController : Controller
    {
        // GET: Gauges
        public ActionResult Gauges()
        {
            return View();
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<h1>
    @Html.Raw(Resources.C1Input.Gauges_Title)
</h1>
 
<p>
    @Html.Raw(Resources.C1Input.Gauges_Text1)
</p>
<p>
    @Html.Raw(Resources.C1Input.Gauges_Text2)
</p>
<p>
    @Html.Raw(Resources.C1Input.Gauges_Text3)
</p>
<ol>
    <li>
        @Html.Raw(Resources.C1Input.Gauges_Text4)
    </li>
    <li>
        @Html.Raw(Resources.C1Input.Gauges_Text5)
    </li>
</ol>