MVC5 Full example

6 posts, 0 answers
  1. ustr
    ustr avatar
    5 posts
    Member since:
    May 2011

    Posted 08 Mar 2016 Link to this post

    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!

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1437 posts

    Posted 10 Mar 2016 Link to this post

    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
  3. Sean Bintley
    Sean Bintley avatar
    8 posts
    Member since:
    Jun 2017

    Posted 26 Nov 2017 Link to this post

    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
  4. Stefan
    Admin
    Stefan avatar
    1661 posts

    Posted 28 Nov 2017 Link to this post

    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.
  5. imane
    imane avatar
    4 posts
    Member since:
    Sep 2017

    Posted 04 Jan Link to this post

    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

  6. Stefan
    Admin
    Stefan avatar
    1661 posts

    Posted 05 Jan Link to this post

    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.
Back to Top