Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - tbum

Pages: [1]
Hello, I'm tbum,

I use treeModel to represent the grid.
When I did addNode, I temporarily set the id value to "pq_tmp_~~~".
And after saving is complete.
and the commit worked fine.

If addNode is executed once more
When the getChanges function is executed, it tries to save 2 rows including the row saved before addList.
So I ran grid.commit() // no args .

I wonder if writing the code as above is correct programming.

Currently I am using paramquery 8.x. I wonder if it's because of that.

And after I addNode and save. When I tried to add one more node to the just-added node, it was added to the last row of the entire grid, so when I checked it in debug mode, I found that the id of the previously created node was still "pq_tmp_~~~" in the cache.

How can I update both cache and after save?


const saveChanges = async () => {
  //attempt to save editing cell.
  // debugger;
  if (grid.saveEditCell() === false) {
    return false;
  const orderChanged = setOrderChanges();
  const parentChanged = setParentChanges();
  let isChanged = false;
  if (orderChanged.length > 0) {
    isChanged = true;

  if (grid.isDirty() && grid.isValidChange({ focusInvalid: true }).valid) {
    isChanged = true;
    var changes = grid.getChanges({ format: 'raw' });

    // console.log(parentChanged);

    legendData = await'/budgetAccount/saveItem', changes);
    // console.log(legendData);
    // return;
    Object.keys(legendData).map(key => {
      let data = legendData[key];
      if (key === 'add') { => {
          const rowIndx = item.pq_ri;
            rowIndx: rowIndx,
            cls: 'new-row',
          // item.budgetIdx = item.budgetIdx.toString();

            rowIndx: rowIndx,
            newRow: {
              budgetIdx: item.budgetIdx,
              budgetCode: item.budgetCode,
              displayCode: item.displayCode,
            checkEditable: false,
            history: false,
            track: true,
          return {
            budgetIdx: item.budgetIdx,


// If the rows value is not entered, the budgetIdx value appears to have been updated in tmp, but it is not actually updated.
        // So after saving, if you try to add a node as a child node of that node, it's like trying to reference a parentId that doesn't exist.
        // misbehavior.
          type: key,
          rows: data,

// However, in this case, there is a problem that children such as pq_tmp_0.234234 remain uncommitted. If you call the getChanges function
        // Trying to save one more time, data increases exponentially.
        // Commit one more time to empty.
          type: key,
      } else {
          type: key,
          rows: data,

By setting the historyMove value to true in treeModel, changes in the order of nodes are also saved in history.
However, nothing changed when I called grid.getChanges . How do I know which nodes have changed their order?

How can I express rows fixed to the first line always without being affected by sorting?
I implemented summary at the bottom. Therefore, one row is fixed for each of the top and bottom.

How can I access the dom object for the grid-overay of the selectionModel?
I want to set different colors depending on the selected area position.

Help for ParamQuery Pro / about selectionModel's block
« on: June 30, 2022, 02:12:46 pm »
Code: [Select]

            selectionModel: {type: 'cell', mode: 'block', row: true, toggle: true,},

I have specified selectionModel as above.
What I want to do is make a block so that only cells in the same row as the cell that started the first selection are selected.
What can I do?
And no event handlers like beforeSelectChange ? This is to be able to invalidate when an unwanted area is selected.

The exact function I want to make is that I want the selectModel to work only for a specific area. Do you offer such a feature as an option?
Otherwise, I tried to develop it using an event handler.

I solved it! thanks for your reply :)

I want to export only selected(cb: checked) rows to excel.

This works fine. However, after exporting data, it moves to page 1.
How can I avoid moving pages?

Code: [Select]
colModel: [
        { dataIndx: "selectRow", maxWidth: 30, minWidth: 30, align: "center", resizable: false,
          title: "",
          menuIcon: false,
          type: 'checkbox',
          sortable: false,
          editor: false,
          dataType: 'bool',
          copy: false,
          cb: {
            all: false,
            header: true
selectionModel: { type: 'row' },
toolbar: {
        items: [
            type: "button",
            label: 'export',
            cls: 'btn btn-success my-1',
            listener: function () {
              let dateStr = $.datepicker.formatDate('yymmdd', new Date());
              let format = 'xlsx';

              if( this.Checkbox('selectRow').getCheckedNodes().length >= 1 ) { //If checked, export selected rows.
                  oper: 'replace',
                  rules: [{ dataIndx: "selectRow", condition: "equal", value: true}]

              let blob = this.exportData({
                sheetName: dateStr,
                format: format,
                render: false
              if(typeof blob === "string"){
                blob = new Blob([blob]);
                oper: 'replace',
                rules: [],
              saveAs(blob, `${dateStr}.${format}`);

I have two questions. Please help.

First, when exporting tree to excel, a '-' character is appended.
Can you change this character to another character?

The second is to create a function that expands only to level 2 nodes among all nodes in the tree and collapses below that level. Which method is the best way? Wouldn't it be better to collapse all nodes and then use expandTo to show level 2?

Code: [Select]

  datagrid = this.getData();
                            var target = 2;
                            var targetLevel = target -1;
                            var targetItem = [];
                                if(targetLevel > v.pq_level){

                            var tree = this.Tree();
                            if(targetItem.length > 0){

ParamQuery Pro Evaluation Support / Re: Paramquery Pro License registration
« on: September 18, 2021, 09:12:36 am »
Thanks !
Hi Taebum Um

Your account has been upgraded to Pro Ultimate.


ParamQuery Pro Evaluation Support / Paramquery Pro License registration
« on: September 18, 2021, 07:19:10 am »

We purchased a ParamQuery Pro License for my company use, please upgrade this account to pro with:

Transaction ID: XXXXXXXXXXX005825R


Pages: [1]