public class HomeController : Controller{ string commString = "";public HomeController(){FWUtility.connString = "Data Source = DEVELOPER1; Initial Catalog = FR8DemoDB; uid=**; pwd=***;";}public ActionResult Index(){commString = "select BrandID, BrandName from BrandMaster order by BrandName";List<BrandMaster> listBrandMaster = FWUtility.GetList<BrandMaster>(FWUtility.GetDataTable(commString));return View(listBrandMaster);}}public class BrandMaster{public string BrandID { get; set; }public string BrandName { get; set; }}This is my controller.The following is my view.@using Kendo.Mvc.UI@using System.Data;@using KendoPivotGrid.Controllers;<div>@(Html.Kendo().PivotGrid<BrandMaster>().Name("pivotgrid").Configurator("#configurator").ColumnWidth(120).Height(570).DataSource(dataSource => dataSource.Ajax().Transport(transport => transport.Read("Index", "Home")).Schema(schema => schema.Cube(cube => cube.Dimensions(dimensions =>{dimensions.Add(model => model.BrandName).Caption("All Brands");})//.Measures(measures => measures.Add("Brands Count").Field(model => model.BrandID).AggregateName("count")) )).Columns(columns =>{columns.Add("BrandName").Expand(true); }).Rows(rows => rows.Add("BrandName").Expand(true))//.Measures(measures => measures.Values("Brands Count")) ) ) </div>
public class HomeController : Controller
{
string commString = "";
public HomeController()
FWUtility.connString = "Data Source = DEVELOPER1; Initial Catalog = FR8DemoDB; uid=**; pwd=***;";
}
public ActionResult Index()
commString = "select BrandID, BrandName from BrandMaster order by BrandName";
List<BrandMaster> listBrandMaster = FWUtility.GetList<BrandMaster>(FWUtility.GetDataTable(commString));
return View(listBrandMaster);
public class BrandMaster
public string BrandID { get; set; }
public string BrandName { get; set; }
This is my controller.The following is my view.@using Kendo.Mvc.UI@using System.Data;@using KendoPivotGrid.Controllers;<div>@(Html.Kendo().PivotGrid<BrandMaster>().Name("pivotgrid").Configurator("#configurator").ColumnWidth(120).Height(570).DataSource(dataSource => dataSource.Ajax().Transport(transport => transport.Read("Index", "Home")).Schema(schema => schema.Cube(cube => cube.Dimensions(dimensions =>{dimensions.Add(model => model.BrandName).Caption("All Brands");})//.Measures(measures => measures.Add("Brands Count").Field(model => model.BrandID).AggregateName("count")) )).Columns(columns =>{columns.Add("BrandName").Expand(true); }).Rows(rows => rows.Add("BrandName").Expand(true))//.Measures(measures => measures.Values("Brands Count")) ) ) </div>
@using Kendo.Mvc.UI@using System.Data;@using KendoPivotGrid.Controllers;<div>@(Html.Kendo().PivotGrid<BrandMaster>().Name("pivotgrid").Configurator("#configurator").ColumnWidth(120).Height(570).DataSource(dataSource => dataSource.Ajax().Transport(transport => transport.Read("Index", "Home")).Schema(schema => schema.Cube(cube => cube.Dimensions(dimensions =>{dimensions.Add(model => model.BrandName).Caption("All Brands");})//.Measures(measures => measures.Add("Brands Count").Field(model => model.BrandID).AggregateName("count")) )).Columns(columns =>{columns.Add("BrandName").Expand(true); }).Rows(rows => rows.Add("BrandName").Expand(true))//.Measures(measures => measures.Values("Brands Count")) ) ) </div>