I am doing this with an igGrid, where the grid is created in c# and all that is in the view is this
@model GridModel @using Infragistics.Web.Mvc <script src="../../Scripts/Infragistics/js/infragistics.js" type="text/javascript"></script> <script src="../../Scripts/Infragistics/js/infragistics.loader.js" type="text/javascript"></script> @( Html.Infragistics() .Loader() .ScriptPath(Url.Content("../../Scripts/Infragistics/js")) .CssPath(Url.Content("../../Content/Infragistics/css")) .Render() ) @{ ViewBag.Title ="Manufacturer Mapping";} @(Html.Infragistics().Grid(Model))
And I have something like this in the c# code
private GridModel GetGridModel() { GridModel gridModel = new GridModel(); gridModel.LoadOnDemand = true; gridModel.DataSourceUrl = Url.Action("GetData"); gridModel.AutoGenerateLayouts = false; gridModel.AutoGenerateColumns = false; gridModel.PrimaryKey = "Id"; gridModel.Columns.Add(new GridColumn { Key = "Id", HeaderText = " ", DataType = "string", Width = "200px" });
gridModel.Features.Add(new CustomGridPaging { Type = OpType.Remote, PageSize = 15, CustomTotalRecordsCount = GetNumberOfList() }); gridModel.Features.Add(new GridResizing { AllowDoubleClickToResize = true, DeferredResizing = false, }); gridModel.Features.Add(new GridSorting { Mode = SortingMode.Single }); gridModel.Features.Add(new GridHiding());
gridModel.Width = "950px";
return gridModel; }
I would like to do the same with creating a tree using remote data. Where can I find a sample code?
Thanks.
Hi Jessica,
Does this sample show enough of what you need or are you looking for something more complex? http://ko.infragistics.com/products/jquery/sample/tree/binding-in-asp-net-mvc
Thanks you for using the Infragistics forums!