I am trying to populate fields in a html form getting data values from a row selected by a user in phpgrid. So the phpgrid has a table from the database and I want to select a row which then gets populated in a html form. I tried using AJAX variables but nothing work. Please help me out.
Asked
Active
Viewed 464 times
1 Answers
0
You can do by creating a ShowSelectedRows function.
<script type="text/javascript">
function ShowSelectedRows(){
var rows = getSelRows();
var dataIDs = $('#Data2').getDataIDs(); // #Data2 is the name given to your table
gdata = $('#Data2').jqGrid('getRowData', rows[0]);
console.log(gdata);
}
</script>
Ensure to enable multiselect for rows. Hope it helps!

Kate
- 51
- 1
- 11