Jump to content

delagoutte

uniGUI Subscriber
  • Posts

    587
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by delagoutte

  1. Hi, "Good" news i can reproduce the probleme in a sample project launch the project( firebird database is in app directory\) click on button "connect" and you will have the error. remove the column WO_ORDER and you don't have the error testcase_grow.zip
  2. i can't reproduce with clientdataset that are include in demo unigui. i'll try to make an extract of my app when i find time
  3. hello, I am trying to reproduce the problem and I have reproduced it partially but not on the Unigui example projects. I will try to explain when the error message occurs. i have a TFDQuery with a query with many field including 2 stringfield and 1 integerfield that i want display in grid. 1- i link the query (via datasource)to the grid and i add a column for one of both string field. test : ok, no error 2-i add a editor unimemo to this column. test : ok, no error 3-i add a second column for second string field with unimemo as editor. test : ok no error 4-i add a third column for the integer field. test KO , grow:true error i try adding a unispinedit as editor for this third column without effect on the error in my case this third column is not very important in my app, so i remove it. For me, the problem is no longer blocking but i think there is a bug somewhere in the unigui framework.
  4. sorry but i can't reproduce in a sample project. i wasted to mutch time on this problem so i decide to not use the editor unimemo directly in grid but a unidbmemo link to the field that i want edit but there is an other problem : i go to the end of texte , suppr all the CRLF and post-> new CRLF is added
  5. it seems to be an internal unigui problem. how can i check that all is good in dpr, mainform, mainmodule, servermodule ... that could explain this error message if i use a uniedit -> no problem
  6. O245 is not the id of grid like i thought. it is the id of the memo that i assign as editor of the first column
  7. i can't reproduce in unigui sample project. i change my code for tying to find the problem (see gif attach to this message) now the query that is linked to grid is active := false;. i launch app -> no error i click a button that set query.active := false; query.active := true; -> error i click again on button or i click on refresh button on dbnavigator -> all is good i can past CRLF in cell. where can i search ? i don't have anything in clientevents i havegrid event oncolumnfilter, onclearfilters, onAjaxEvent edit1 : i try this : unlink dbgrid from the datasource add a new grid, link to datasource, create column launch app -> same error
  8. same error with last unigui version 1579. i'll try later to reproduce in demo examples
  9. no, i don't this this in my source
  10. i'll try to update to the last version but i don't see any fix for a problem like that in releasenote. i'll give you the result after update
  11. 1.90.0.1564 with delphi XE7
  12. if i use unimemo as editor with or without displaymemo i have this error when i load data : : GridWordReplace:TUniDBGrid:Config Option: O245->grow:true<br/>is refering a previous request,<br/>it's not allowed in AJAX request or JS handler.<br/>Use equivalent Public Property or Method instead any idea ?
  13. i copy from a unimemo with Ctrl+C i past in the cell with Ctrl+V ps : if i past in notepad i have the CRLF
  14. i thought that but no, if i set display memo to true. i have a wordwrap on the cell if the text is too long but in the value of the cell/ the string not really contain a CRLF. and i copy a string that contain a CRLF, the CRLF is lost when i past in the cell
  15. Hello, if i copy a text with many line and i past it in a grid cell the CRLF are removed. how can ido to keep then ? a grid option that i don't konw ? sample : i copy "my text begin here" i past this text in the grid cell. the text in cell became "my text begin here"
  16. Hello, i must implement a function that must work on a selected text in a memo. for exemple if i have this in a unimemo 1 - Montext1 2 - Montext1 3 - Montext1 i select the text "Montext1" of the second line, i call a function that replace number from a string by @ result : 1 - Montext1 2 - Montext@ 3 - Montext1 how can i do a thing like this (the function that change the selected text must be in seerver side )?
  17. interesting approach🙃 it works. thanks a lot
  18. You could find a test case with the problem (line 165 of main.pas) in source code i add - old method AddFunctionToGrid that works but override all grid not only specified grid -new code AddFunctionToGridV2 that should not override all grid but only the specified grid but sort no longer works GridColumnSort.zip
  19. no error but... the sort no longer works. i try do a test case
  20. the error comes from this line : this.callParent(arguments);'+#13#10+ no idea without test case ?
  21. i try with is if AddCancelSort then begin aGrid.ClientEvents.ExtEvents.Values['reconfigure']:= aGrid.ClientEvents.ExtEvents.Values['reconfigure']+ ' for (let i = 0; i<columns.length;i++){ '+ ' columns[i].sort= function(a) {'+#13#10+ ' var me = this;'+#13#10+ ' var grid = me.up(''tablepanel'');'+#13#10+ ' var ds = grid.store;'+#13#10+ ''+#13#10+ ' if (a==null && this.el.hasCls(''x-column-header-sort-DESC'')) {'+#13#10+ ' var removeIndx = -1;'+#13#10+ ' var activeIndx = me.getSortParam();'+#13#10+ ' var i = 0;'+#13#10+ ' var sortersCount = ds.sorters.items.length;'+#13#10+ ' ds.sorters.items.forEach(function(s) {'+#13#10+ ' if (s._property === activeIndx) {'+#13#10+ ' removeIndx = i;'+#13#10+ ' //return false;'+#13#10+ ' };'+#13#10+ ' i++;'+#13#10+ ' });'+#13#10+ ''+#13#10+ ' if (removeIndx != -1) {'+#13#10+ ' ds.sorters.removeAt(removeIndx);'+#13#10+ ' if (sortersCount > 1) {'+#13#10+ ' ds.load();'+#13#10+ ' } else {'+#13#10+ ' ajaxRequest(grid, ''sortClearAll'', []);'+#13#10+ ' ds.load();'+#13#10+ ' };'+#13#10+ ''+#13#10+ ' grid.headerCt.setSortState();'+#13#10+ ' };'+#13#10+ ' } else {'+#13#10+ ' this.callParent(arguments);'+#13#10+ ' };'+#13#10+ ' grid.setSortNumbers();'+#13#10+ ' }'+#13#10+ '}'+#13#10; end; but with this when i click on clumn header i have this error in console Uncaught TypeError: can't access property "apply", b is undefined callParent ExtJS sort http://localhost:8079/:1755 ExtJS 26 afterRender http://localhost:8079/uni-1.90.0.1564/ext-unicommon-min.js:9 ExtJS 4 constructor http://localhost:8079/uni-1.90.0.1564/ext-unicommon-min.js:9 ExtJS 25 hav you got an idea of the reason for this error ?
  22. Hello, i need expert extjs By default unigui gridcolumn sort have only 2 state when we click on column title : ascending, descending. i needed 3 state : ascending, descending; none for this i use this code to add this feature to a grid : if AddCancelSort then begin aGrid.ClientEvents.ExtEvents.Values['viewready'] := aGrid.ClientEvents.ExtEvents.Values['viewready']+ ''+#13#10+ ' me.getColumnIndex = function(grid, dataIndex, delta) {'+#13#10+ ' gridColumns = grid.headerCt.getGridColumns();'+#13#10+ ' for (var i = 0 + delta; i < gridColumns.length; i++) {'+#13#10+ ' if (gridColumns[i].dataIndex == dataIndex) {'+#13#10+ ' return i;'+#13#10+ ' }'+#13#10+ ' }'+#13#10+ ' };'+#13#10+ ' '+#13#10+ ' me.findColumnIndex = function(columns, dataIndex) {'+#13#10+ ' var index;'+#13#10+ ' for (index = 0; index < columns.length; ++index) {'+#13#10+ ' if (columns[index].dataIndex == dataIndex) {'+#13#10+ ' break;'+#13#10+ ' }'+#13#10+ ' }'+#13#10+ ' return index == columns.length ? -1 : index;'+#13#10+ ' };'+#13#10+ ''+#13#10+ ' me.setSortNumbers = function() {'+#13#10+ {$IFDEF DEBUG} ' console.log("'+agrid.Name+'-setSortNumbers"); '+#13#10+ {$ENDIF} ' var sCount = me.store.sorters.getCount();'+#13#10+ ''+#13#10+ ' me.el.select(''small.sortnumber'').elements.forEach(function(el) {'+#13#10+ ' $(el).remove()'+#13#10+ ' });'+#13#10+ ''+#13#10+ ' me.store.sorters.items.forEach(function(s) {'+#13#10+ ' var indx, col;'+#13#10+ ' indx = me.getColumnIndex(me, parseInt(s._property), parseInt(delta));'+#13#10+ ''+#13#10+ ' if ( me.columnManager.columns != null){'+#13#10+ ' var col = me.columnManager.columns[indx];'+#13#10+ ' if (col) col.el.select(''.x-column-header-text'').elements[0].innerHTML += ''<small class="sortnumber"> ('' + sCount + '')</small>'';'+#13#10+ ' sCount--;'+#13#10+ ' }'+#13#10+ ' });'+#13#10+ ' };'+#13#10+ ''+#13#10+ ' me.resetSort = function() {'+#13#10+ ' var activeIndx = currentHeaders.activeHeader.dataIndex;'+#13#10+ ' var i = 0;'+#13#10+ ' var sortersCount = me.store.sorters.items.length;'+#13#10+ ' me.store.sorters.items.forEach(function(s) {'+#13#10+ ' if (s._property === activeIndx) {'+#13#10+ ' removeIndx = i;'+#13#10+ ' return false;'+#13#10+ ' };'+#13#10+ ' i++;'+#13#10+ ' });'+#13#10+ ''+#13#10+ ' if (removeIndx != -1) {'+#13#10+ ' me.store.sorters.removeAt(removeIndx);'+#13#10+ ' if (sortersCount > 1) {'+#13#10+ ' me.store.load();'+#13#10+ ' } else {'+#13#10+ ' ajaxRequest(me, ''sortClearAll'', []);'+#13#10+ ' me.store.load();'+#13#10+ ' };'+#13#10+ ''+#13#10+ ' me.headerCt.setSortState();'+#13#10+ ' me.setSortNumbers();'+#13#10+ ' };'+#13#10+ ' };'+#13#10+ ''+#13#10+ ' Ext.override(Ext.grid.column.Column, {'+#13#10+ ' sort: function(a) {'+#13#10+ ' var me = this;'+#13#10+ ' var grid = me.up(''tablepanel'');'+#13#10+ ' var ds = grid.store;'+#13#10+ ''+#13#10+ ' if (a==null && this.el.hasCls(''x-column-header-sort-DESC'')) {'+#13#10+ ' var removeIndx = -1;'+#13#10+ ' var activeIndx = me.getSortParam();'+#13#10+ ' var i = 0;'+#13#10+ ' var sortersCount = ds.sorters.items.length;'+#13#10+ ' ds.sorters.items.forEach(function(s) {'+#13#10+ ' if (s._property === activeIndx) {'+#13#10+ ' removeIndx = i;'+#13#10+ ' //return false;'+#13#10+ ' };'+#13#10+ ' i++;'+#13#10+ ' });'+#13#10+ ''+#13#10+ ' if (removeIndx != -1) {'+#13#10+ ' ds.sorters.removeAt(removeIndx);'+#13#10+ ' if (sortersCount > 1) {'+#13#10+ ' ds.load();'+#13#10+ ' } else {'+#13#10+ ' ajaxRequest(grid, ''sortClearAll'', []);'+#13#10+ ' ds.load();'+#13#10+ ' };'+#13#10+ ''+#13#10+ ' grid.headerCt.setSortState();'+#13#10+ ' };'+#13#10+ ' } else {'+#13#10+ ' this.callParent(arguments);'+#13#10+ ' };'+#13#10+ ' grid.setSortNumbers();'+#13#10+ ' }'+#13#10+ ' });'#13#10; end; this code works fine since many years but i just realize there is a failure in my code. in the end of this code i use Ext.override(Ext.grid.column.Column, {'+#13#10+..... but with this code i override all grids in my app and not only the grid that i want add the feature. how can i rewrite this part of code for not using Ext.override(Ext.grid.column.Column, {.... and apply only for the designated grid ?
  23. @Sherzodyou are always on top 😄 thanks again
  24. @Hayri ASLAN have you yet work on integration of unisptoggle ? if yes , where can i fond the source code
  25. hello, i would like this toggle look like this : but i dont find the css class that i must use for having this result. any css champion could help me ?
×
×
  • Create New...