This is a migrated thread and some comments may be shown as answers.

MVC5 Full example

5 Answers 300 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
ustr
Top achievements
Rank 1
ustr asked on 08 Mar 2016, 03:46 PM

Hello,

I would like to see the full example of Kendo Diagram for Asp.Net MVC. Especially I would like to know what is hidden behind the code in the default example You offer on website (http://demos.telerik.com/aspnet-mvc/diagram/index):

public ActionResult _OrgChart()

{

return Json(DiagramDataRepository.OrgChart(), JsonRequestBehavior.AllowGet);

}

Can You show me, what's in DiagramDataRepository.OrgChart() method, please? Or tell me, where I can find it?

Thank You!

5 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 10 Mar 2016, 10:11 AM
Hello wgspider,

I would recommend checking our offline demos, which are located in the Kendo UI installation path, under the \wrappers\aspnetmvc\Examples directory. 

Regards,
Alexander Popov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Sean Bintley
Top achievements
Rank 2
answered on 26 Nov 2017, 09:43 AM
I think it would be useful to include this in the demo source code online as it is useful to know what it is doing
0
Stefan
Telerik team
answered on 28 Nov 2017, 11:31 AM
Hello, Sean,

This is a valid request and indeed we have started to move the relevant code for every demo inside the visible controllers.

We have started widget by widget and I hope that soon all of the widgets will be covered.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
imane
Top achievements
Rank 1
answered on 04 Jan 2018, 08:48 AM

Hi  I have like question the "ustr" i want use diagram  "https://demos.telerik.com/aspnet-mvc/diagram" link and i don't know what code it's use in method 

public ActionResult _OrgChart(){return Json(DiagramDataRepository.OrgChart(), JsonRequestBehavior.AllowGet);}

please i want to help what i do

0
Stefan
Telerik team
answered on 05 Jan 2018, 11:17 AM
Hello, Imane,

This is the code behind the OrgChart() method

public static List<CorporateData> OrgChart()
{
    List<CorporateData> result = new List<CorporateData>();
    CorporateData antonio = new CorporateData("Antonio", "Moreno", "antonio.jpg", "Team Lead", "#1696d3");
    result.Add(antonio);
 
    CorporateData elizabeth = new CorporateData("Elizabeth", "Brown", "elizabeth.jpg", "Design Lead", "#ef6944");
    antonio.Items.Add(elizabeth);
 
    CorporateData ann = new CorporateData("Ann", "Devon", "ann.jpg", "UI Designer", "#ef6944");
    elizabeth.Items.Add(ann);
 
    CorporateData diego = new CorporateData("Diego", "Roel", "diego.jpg", "QA Engineer", "#ee587b");
    antonio.Items.Add(diego);
 
    CorporateData fran = new CorporateData("Fran", "Wilson", "fran.jpg", "QA Intern", "#ee587b");
    diego.Items.Add(fran);
 
    CorporateData felipe = new CorporateData("Felipe", "Izquiedro", "felipe.jpg", "Senior Developer", "#75be16");
    antonio.Items.Add(felipe);
 
    CorporateData daniel = new CorporateData("Daniel", "Tonini", "daniel.jpg", "Developer", "#75be16");
    felipe.Items.Add(daniel);
 
    return result;
}

Also, as my colleague advised all of the code and the examples are loaded inside a runnable sample project:

https://docs.telerik.com/aspnet-mvc/introduction#sample-application

I hope this is helpful.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Diagram
Asked by
ustr
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Sean Bintley
Top achievements
Rank 2
Stefan
Telerik team
imane
Top achievements
Rank 1
Share this question
or