Datagrid2 lack of functionnalities - Mendix Forum

Datagrid2 lack of functionnalities

2

Hi,

Datagrid2 is too limited right now:

- no inline-row editing,

 - last added data goes to the last page and is not visible for the user (there should be an option display last row or page automatically when adding data)

- no total / row count

- no grouping

 

Should definitely take inspiration from Powerbuilder Datawindow, never seen something as powerfull and as easy at the same time.

 

Considering switching to another tool / platform because of these limitations although Mendix is great.

 

 

asked
3 answers

Thank you Reto.

 

But what I need the most is :

1) keeping last row displayed when entering data

2) a total row : count, sum

 

 

Created

https://marketplace.mendix.com/link/component/230152

 

Adding vertial scrolling and sticky columns here:

 

 

setTimeout(function() {  function initColumnResizer() {    const resizers = document.querySelectorAll('.th .column-resizer');    resizers.forEach(resizer => {      resizer.addEventListener('mousedown', onMouseDown);    });

    document.addEventListener('mousemove', onMouseMove);    document.addEventListener('mouseup', onMouseUp);  }

  let isResizing = false;

  function onMouseDown(event) {    isResizing = true;  }

  function onMouseMove(event) {    if (!isResizing) return;

    triggerTopHorizontalScroll();  }

  function onMouseUp(event) {    if (isResizing) {      isResizing = false;    }  }

  function TopHorizontalScroll(element) {    var scrollbar = element.parentNode.querySelector('.custom-scrollbar');    var innerDiv;

    if (!scrollbar) {      scrollbar = document.createElement('div');      innerDiv = document.createElement('div');

      scrollbar.className = 'custom-scrollbar';      scrollbar.style.overflow = 'auto';      scrollbar.style.overflowY = 'hidden';      scrollbar.style.width = '100%';      scrollbar.style.boxSizing = 'border-box';      scrollbar.style.height = '20px';      scrollbar.style.marginBottom = '10px';

      innerDiv.style.width = element.scrollWidth + 'px';      innerDiv.style.paddingTop = '1px';      innerDiv.appendChild(document.createTextNode('\xA0'));

      scrollbar.appendChild(innerDiv);

      scrollbar.onscroll = function() {        element.scrollLeft = scrollbar.scrollLeft;      };      element.onscroll = function() {        scrollbar.scrollLeft = element.scrollLeft;      };

      element.parentNode.insertBefore(scrollbar, element);    } else {      innerDiv = scrollbar.firstChild;      innerDiv.style.width = element.scrollWidth + 'px';    }  }

  function triggerTopHorizontalScroll() {    setTimeout(function() {      var dataGrid = document.querySelector('.widget-datagrid-content');      if (dataGrid) {        TopHorizontalScroll(dataGrid);      }    }, 0);  }

  initColumnResizer();  triggerTopHorizontalScroll();}, 1500);

Created

Mui Datagrid component is a good example of what Datagrid2 could be also.

Created