⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

selected row into textbox



mutaqin
  • profile picture
  • Member

Posted 15 August 2013 - 07:14 AM

hello master, i'm just learn to use grocery crud. i've search for along time but not found the answer. How to get the value of column in grocery crud table in selected row ( onclick) into a textbox. i'll appriciate for any answer. i'm sorry for my bad english. thx

 

regards Mutaqin

 


Amit Shah
  • profile picture
  • Member

Posted 17 August 2013 - 06:26 AM

Hi mutaqin

Welcome to Grocerycrud Forums.

Well this is all to do with Javascripting. You need to assign an onclick function to the each row of the table. Technically you can do it with hot / late binding with javascript. Secondly, on click of the same, you need to pickup the value you want to display.

 

Google out for the jquery on row click  .. there you should get a lot of links for explanation.  Even Grocerycrud at the end of the day is using HTML / tables :)


davidoster
  • profile picture
  • Member

Posted 17 August 2013 - 17:29 PM

Well [member=amit shah] I think [member=mutaqin] is looking for the value of a column on a specific row.

So another possibility could be the callback_column function of Grocery CRUD.

 

Because of the $row variable we can limit the use of the on click effect only on the row we need to.


Amit Shah
  • profile picture
  • Member

Posted 18 August 2013 - 09:18 AM

Hello Mr. David,

 

Well i may be wrong in my explaination but the solution i shared was the reason he is looking to have it post the generation of the gc table. And .. to be specific .. its he is talking on for  On Click of a row (of a generated table) .. This is what my understanding was and that's why i shared that solution. But i am always obliged to learn from your experience.