Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
445
How do I create an igTree using pure c#?
posted

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.

Parents
No Data
Reply Children
No Data