EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Stefan B. on November 06, 2014, 08:22:57 AM



Title: For what is the idField in datagrid used?
Post by: Stefan B. on November 06, 2014, 08:22:57 AM
I have a question: For what is the idField in datagrid used?
Is there an example?


Title: Re: For what is the idField in datagrid used?
Post by: jaimi on November 06, 2014, 12:08:26 PM
...
toolbar     : '#tobPferd',
  url         : 'pferd.act.php?frm=HOM&act=V&sel=' + vSEL,
  saveUrl     : 'pferd.act.php?frm=HOM&act=I&lkp=XXX',
  updateUrl   : 'pferd.act.php?frm=HOM&act=U&lkp=XXX',
  destroyUrl  : 'pferd.act.php?frm=HOM&act=D&lkp=XXX',
  remoteSort  : 'true',
  idField     : 'OLT30A001T_KEY',
  queryParams : {sort: 'HOM_NAME'},
...

the idField is post(ed) to the destroyUrl. In my case it is the Primary Key Value for the Delete statement in the MySQL Query.

If you need more, let me know.
Jaimi


Title: Re: For what is the idField in datagrid used?
Post by: Stefan B. on November 07, 2014, 12:31:45 AM
THX for this example. I try it and its works.
Also it is used by the 'updateUrl'.