@section SampleHeading{PredictiveAnalytics-Titanic-ASP.NET MVC-SYNCFUSION} @section ScriptReferenceSection{ } @section ControlsSection{
@( Html.EJ().Tab("defaultTabs").Items(data => { data.Add().ID("gridDiv").Text("Predicted Result").ContentTemplate(@
@(Html.EJ().Grid("resultGrid").Datasource(ds => ds.URL(@Url.Content("~/PredictiveAnalytics/GetTitanicData")).Adaptor("UrlAdaptor")) .IsResponsive(true) .AllowPaging(true).PageSettings(page => page.PageCount(3).PageSize(17)) .AllowResizeToFit(true) .AllowResizing(true) .MinWidth(700) .AllowScrolling().ScrollSettings(scroll => { scroll.Height(350); }) .ClientSideEvents(eve => eve.ActionComplete("actioncomplete")) .Columns(col => { var inputColumns = ViewBag.InputColumns as List; var outputColumns = ViewBag.OutputColumns as List; var inputNumericColumns = ViewBag.InputNumericColumns as List; var outputNumericColumns = ViewBag.OutputNumericColumns as List; int inputCounter = 0; int outputCounter = 0; if (inputColumns != null) { for (int i = 0; i < inputColumns.Count; i++) { for (int j = 0; j < inputNumericColumns.Count; j++) { if (inputColumns[i] == inputNumericColumns[j]) { col.CssClass("numericColumnAlignment"); col.Field(inputColumns[i]).Add(); inputCounter++; } } if (inputCounter == 0) { col.Field(inputColumns[i]).Add(); } inputCounter = 0; } if (outputNumericColumns.Count != 0) { for (int j = 0; j < outputColumns.Count; j++) { for (int k = 0; k < outputNumericColumns.Count; k++) { if (outputColumns[j] == outputNumericColumns[k]) { col.CssClass("highlightNumericAlignment"); col.Field(outputColumns[j]).Add(); outputCounter++; } } if (outputCounter == 0) { col.CssClass("predictedColumnColor"); col.Field(outputColumns[j]).Add(); } } } else { foreach (var value in outputColumns) { col.CssClass("predictedColumnColor"); col.Field(value).Add(); } } } } )) ); data.Add().ID("rCode").Text("R").ContentTemplate(@
); data.Add().ID("pmml").Text("PMML").ContentTemplate(@
); }).Height("550px")) @Html.EJ().ScriptManager() } @section StyleSection{ } @section ScriptSection{ }