0

Its a thread upon this one: JQgrid checkbox onclick update database

right now i got it to work, but now i am able to click on the column cell and update happends in my DB, but what i really want is that update happends only on checkbox click only, not cell click.

Community
  • 1
  • 1
Timsen
  • 4,066
  • 10
  • 59
  • 117
  • I tried out the demo, that was mentioned by Oleg in your menthioned link and I had to explicit click on the checkbox. If I clicked the cell, the checkbox would not have been activated. I used FF 3.6.20, Safari, IE 8 and Chrome 12.x – Reporter Aug 31 '11 at 07:38
  • In the demo I first get `iCol` - the index of 'Aktiv' column with the checkboxes. Then I enumerated all rows of the grid and set `click` handle **only in the `iCol`** column of every row. So clicking of another cells not works. What behavior you want to have exactly? – Oleg Aug 31 '11 at 08:18

1 Answers1

1

I hope I understand you correct and you want to set click handle on the checkbox only and not on the cell having the checkbox. In the case you should just change the line

$(rows[i].cells[iCol]).click(function (e) {

to

$("input", rows[i].cells[iCol]).click(function (e) {

See the modified demo here.

Oleg
  • 220,925
  • 34
  • 403
  • 798
  • gah... i missed "," and it didnt worked ofcourse :D my stupid small mistackes... thanks again Oleg – Timsen Aug 31 '11 at 08:40