Author Topic: How to add new option or event in grid  (Read 737 times)

hyh888

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 142
    • View Profile
How to add new option or event in grid
« on: December 27, 2021, 07:42:09 am »
To saving code and reduce bugs, I hope to add saveUrl(url to save data) and getUrl(url to get the json data) for grid, and also hope to add inbuild SaveChanges event to grid for saving data with saveUrl.
Would you like to provide help?
Thank you very much.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to add new option or event in grid
« Reply #1 on: December 31, 2021, 11:48:39 am »
All the grid methods reside in $.paramquery.pqGrid.prototype. you can overwrite or add custom methods to it but be careful not to
unintentionally overwrite any private methods of the grid.

There is inbuilt change event in the grid that fires whenever there is a change / addition/ deletion of data in the grid.

https://paramquery.com/pro/api#event-change

hyh888

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 142
    • View Profile
Re: How to add new option or event in grid
« Reply #2 on: December 31, 2021, 04:57:14 pm »
Thank you very much for your kindly response. For these days,without your reply, I'm worried about if my idea had intrude your treasure for pqgrid framework . Is there any sample for modifing $.paramquery.pqGrid.prototype, I will study it and feedback the result.
Happy new year!
« Last Edit: December 31, 2021, 06:30:46 pm by hyh888 »