Esempio n. 1
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#line 3 "G:\Sample Pojects\TreeView\TreeView\Pages\Contact.cshtml"

            ViewData["Title"] = "Contact";

#line default
#line hidden
            BeginContext(71, 136, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("ejs-treegrid", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "90cabef4fd054d5aae7aad7d986964d7", async() => {
                BeginContext(184, 8, true);
                WriteLiteral("\r\n\r\n    ");
                EndContext();
            }
                                                                        );
            __Syncfusion_EJ2_TreeGrid_TreeGrid = CreateTagHelper <global::Syncfusion.EJ2.TreeGrid.TreeGrid>();
            __tagHelperExecutionContext.Add(__Syncfusion_EJ2_TreeGrid_TreeGrid);
            __Syncfusion_EJ2_TreeGrid_TreeGrid.Id = (string)__tagHelperAttribute_0.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
#line 6 "G:\Sample Pojects\TreeView\TreeView\Pages\Contact.cshtml"
            __Syncfusion_EJ2_TreeGrid_TreeGrid.DataSource = TreeGridItems.GetTreeData();

#line default
#line hidden
            __tagHelperExecutionContext.AddTagHelperAttribute("dataSource", __Syncfusion_EJ2_TreeGrid_TreeGrid.DataSource, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            __Syncfusion_EJ2_TreeGrid_TreeGrid.ChildMapping = (string)__tagHelperAttribute_1.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
#line 6 "G:\Sample Pojects\TreeView\TreeView\Pages\Contact.cshtml"
            __Syncfusion_EJ2_TreeGrid_TreeGrid.TreeColumnIndex = 1;

#line default
#line hidden
            __tagHelperExecutionContext.AddTagHelperAttribute("treeColumnIndex", __Syncfusion_EJ2_TreeGrid_TreeGrid.TreeColumnIndex, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(207, 2, true);
            WriteLiteral("\r\n");
            EndContext();
        }
Esempio n. 2
0
        public static List <TreeGridItems> GetTreeData()
        {
            List <TreeGridItems> BusinessObjectCollection = new List <TreeGridItems>();

            TreeGridItems Record1 = null;

            Record1 = new TreeGridItems()
            {
                TaskId       = 1,
                CategoryName = "Planning",
                StartDate    = new DateTime(2016, 06, 07),
                Duration     = 5,
                Children     = new List <TreeGridItems>(),
            };
            TreeGridItems Child1 = new TreeGridItems()
            {
                TaskId       = 2,
                CategoryName = "Plan timeline",
                StartDate    = new DateTime(2016, 06, 07),
                Duration     = 5,
                Children     = new List <TreeGridItems>(),
            };

            TreeGridItems Child2 = new TreeGridItems()
            {
                TaskId       = 3,
                CategoryName = "Plan budget",
                StartDate    = new DateTime(2016, 06, 07),
                Duration     = 5
            };
            TreeGridItems Child3 = new TreeGridItems()
            {
                TaskId       = 4,
                CategoryName = "Allocate resources",
                StartDate    = new DateTime(2016, 06, 07),
                Duration     = 5
            };

            Record1.Children.Add(Child1);
            Record1.Children.Add(Child2);
            Record1.Children.Add(Child3);
            TreeGridItems Record2 = new TreeGridItems()
            {
                TaskId       = 6,
                CategoryName = "Design",
                StartDate    = new DateTime(2021, 08, 25),
                Duration     = 3,
                Children     = new List <TreeGridItems>()
            };
            TreeGridItems Child5 = new TreeGridItems()
            {
                TaskId       = 7,
                CategoryName = "Software Specification",
                StartDate    = new DateTime(2021, 08, 25),
                Duration     = 3
            };

            TreeGridItems Child6 = new TreeGridItems()
            {
                TaskId       = 8,
                CategoryName = "Develop prototype",
                StartDate    = new DateTime(2021, 08, 25),
                Duration     = 3
            };
            TreeGridItems Child7 = new TreeGridItems()
            {
                TaskId       = 9,
                CategoryName = "Get approval from customer",
                StartDate    = new DateTime(2024, 06, 27),
                Duration     = 2
            };

            Record2.Children.Add(Child5);
            Record2.Children.Add(Child6);
            Record2.Children.Add(Child7);
            BusinessObjectCollection.Add(Record1);
            BusinessObjectCollection.Add(Record2);
            return(BusinessObjectCollection);
        }