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 - sims4550

Pages: [1]
1
Help for ParamQuery Pro / Re: problem related to editor
« on: November 17, 2015, 09:25:25 am »
Thank you for reply.
I think probably other part of my program affect the problem.
I will check again my program.

Thank you.

2
Help for ParamQuery Pro / problem related to editor
« on: November 15, 2015, 09:23:46 am »
Hi

I have some problem related to editor.
Here is my JSON data.

var itemlist = [
{"id":"A1-B1-2","name":"glove",   "deliverytime":"5",   "unitprice":2},
{"id":"A1-B1-3","name":"cap",   "deliverytime":"5",   "unitprice":3},
{"id":"A1-B2-1","name":"mask",   "deliverytime":"10",   "unitprice":2},
{"id":"A2-B1-4","name":"needle","deliverytime":"11",   "unitprice":1}];

and I describe colModel like below.

var colM=[
{title: "id", dataIndx: "id",
   editor: {
      type:   "select",
      valueIndx:   "id",
      labelIndx:   "name",
      dataMap:   ['deliverytime','unitprice'],
      selectItem:   {on:true},
      options:   itemlist
      }
   },
   render:   function(ui){
      var cellData=ui.cellData;
      var al=itemlist.length;

      for(var i=0;i<al;i++){
         if(cellData==itemlist.id){
            return itemlist.id;
         }
      }
   }
},
{title: "deliverytime", dataIndx: "deliverytime"},
{title: "deliverytime", dataIndx: "unitprice"},
]

When I select "A1-B1-2", I can't select "A1-B1-3" and "A1-B2-1".
However I can select "A2-B1-4".
And I can select "A1-B1-3" and "A1-B2-1" after I select "A2-B1-4".

Probably the problem is I can't select item which has same data.

Is this my code problem  or some kind of bug?

Pages: [1]