Pregunta

I need to build an SPA with Durandal Breeze and Knockout, but for data entry I need to show sections similar to excel.

I had found a nice plugin Handsontable this in appearance is exactly for me, but I don't know if this plugin is compatible with Durandal Breeze and Knockout for:

  • Enter data in the cells
  • Move easily between cells with arrow keys
  • Copy and paste values from/to excel
  • Export data to Excel/Pdf
  • Compatible in mobile devices
¿Fue útil?

Solución

I can't make a comment and this is by no means a complete answer but here is a first attempt I worked up. for some reason you have to click the screen for the grid to appear : define(['knockout'], function (ko) { var ctor = function () {

    this.columns = 4
    this.rows = 4
    this.data = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 92, 93, 94], [7, 8, 9,]]
    this.init = function (view) {


    }

};

ctor.prototype.attached = function () {
    $('#example').handsontable({
        data: this.data,
        minSpareRows: 1,
        colHeaders: true,
        contextMenu: true
    });
};
ctor.prototype.activate = function (view) {

};

ctor.prototype.binding=function(view)
{
   // this.init(view);
}
return ctor;
});
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top