Installation of dataTable Editor In mvc5 Projects

Installation of dataTable Editor In mvc5 Projects

OrTurjamenOrTurjamen Posts: 17Questions: 2Answers: 0

Hey i try to install data-table Editor on my mvc 5 project, but cannot understand how to implement this,
I work With UnitOfWork class and Repository, in my controller to get the entity i called using (unit of work instead using db)
example--> using (var unitOfWork = new UnitOfWork(new demoOrTestEntities()))
there a way to implment in controller with unit of work?

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin
    Answer ✓

    Editor's .NET libraries require access to the database as they build their own SQL. They don't work with an external class that would create / edit / delete data I'm afraid.

    Allan

  • OrTurjamenOrTurjamen Posts: 17Questions: 2Answers: 0

    ok, did the 15 days free trail can be work with my project to see how it work? or its only the demo project you can download?

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin

    You can integrate it into your own project no problem. Its the same as the licensed version except for the Javascript which is obfuscated in the trial.

    Allan

  • OrTurjamenOrTurjamen Posts: 17Questions: 2Answers: 0

    Ok. thank you, its work now, i have another question, i get struggled when try to show and update tables with connection to other table, i try like the example but always get the multi-part identifier could not be bound? what i doing wrong?

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin

    I don't actually know what code you are using, so I don't know why it is going wrong. I presume you are doing a left join? Can you show me that code please? The documentation for that kind of join is available here.

    Allan

  • OrTurjamenOrTurjamen Posts: 17Questions: 2Answers: 0

    i able to show the other data form join table, but now i am not able to see the option of
    left join in edit box of type select



    var editor; // use a global for the submit and return data rendering in the examples editor = new $.fn.dataTable.Editor({ ajax:'@Url.Action("GetData","Service")', table: "#example", fields: [{ label: "id:", name: "MealService.id" }, { label: "CourseType_id:", name: "MealService.CourseType_id" }, { label: "Description:", name: "MealService.Description" }, { label: "Image_id:", name: "MealService.Image_id" }, ** { label: "MealType_Name:", name: "MealService.MealType_Id", type: "select" }** ] }); $('#example').DataTable({ dom: "Bfrtip", ajax: '@Url.Action("GetData", "Service")', columns: [ { data: "MealService.id" }, { data: "MealService.CourseType_id" }, { data: "MealService.Description" }, { data: "MealService.Image_id" }, { data: "MealType.MealType_Name" } ], select: true, buttons: [ { extend: "create", editor: editor }, { extend: "edit", editor: editor }, { extend: "remove", editor: editor } ] });
  • OrTurjamenOrTurjamen Posts: 17Questions: 2Answers: 0

    Ok. its worked, i just forget to add option class in controller

  • OrTurjamenOrTurjamen Posts: 17Questions: 2Answers: 0
    edited July 2019

    two question before i buy editor,
    1: why always when i make a build of my project its always says Method not found: 'System.String[] System.String.Split(Char, System.StringSplitOptions)'.
    i look for answer, but even when i replace the dll file with one from the download source its still happen, if i will replace the file after the build it will work! what can we do?
    2:how to edit style for all the DTED class?

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin
    1. I think this is a packaging error and it should be fixed with 1.9.1. Good to hear you've got a workaround for now.
    2. You'd need to modify the Editor stylesheet or override its styling to suit whatever styling it is that you need.

    Allan

  • OrTurjamenOrTurjamen Posts: 17Questions: 2Answers: 0

    thank you, one more question allan, i see that when i used option to enable select on the edit , the value returns in mixed order, and not the order they in the database
    for example:
    () {"draw":null,"data":[],"recordsTotal":null,"recordsFiltered":null,"error":null,"fieldErrors":[],"id":null,"meta":{},"options":{"TransportationService.HourUsage":[{"value":0,"label":"0"},{"value":1,"label":"1"},{"value":10,"label":"10"},{"value":11,"label":"11"},{"value":12,"label":"12"},{"value":13,"label":"13"},{"value":14,"label":"14"},{"value":15,"label":"15"},{"value":16,"label":"16"},{"value":17,"label":"17"},{"value":18,"label":"18"},{"value":19,"label":"19"},{"value":2,"label":"2"},{"value":20,"label":"20"},{"value":21,"label":"21"},{"value":22,"label":"22"},{"value":23,"label":"23"},{"value":24,"label":"24"},{"value":3,"label":"3"},{"value":4,"label":"4"},{"value":5,"label":"5"},{"value":6,"label":"6"},{"value":7,"label":"7"},{"value":8,"label":"8"},{"value":9,"label":"9"}]},"files":{},"upload":{"id":null},"debug":null,"cancelled":[]} ()

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin
    Answer ✓

    Use the Order() method of the Options class to specify ordering for the data.

    Allan

  • OrTurjamenOrTurjamen Posts: 17Questions: 2Answers: 0

    Allan thank you, i have a problem i try to change the opacity of the DTED_Lightbox_Background class to 0 from 1, how can i do this?

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin

    The default for it when visible is 1 - see this example. When its not on the page then it is just removed from the DOM.

    Allan

  • OrTurjamenOrTurjamen Posts: 17Questions: 2Answers: 0

    Hey Allan, yesterday i buy editor license, i would like to know when
    and if the 'System.String[] System.String.Split(Char, System.StringSplitOptions)' will be solved?
    and the last one is if i have option to allow filter on each column i have ? when using serverside?

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin

    We are planning on making a release of Editor 1.9.1 which should resolve this issue. Until then, including the dll locally should do the business.

    and the last one is if i have option to allow filter on each column i have ? when using serverside?

    This should work with server-side processing if you are using our dll: https://datatables.net/examples/api/multi_filter.html .

    Regards,
    Allan

  • OrTurjamenOrTurjamen Posts: 17Questions: 2Answers: 0

    Thanks Allan, i have another important question, i try to upload image to my database,
    i just want to upload the image to folder download in my project, and save the URL for this folder with the image name, in my image table image_url column , how i can do this?

This discussion has been closed.