thank you very much, Romyn, your code helped me as well.
OK, it seems i solved the problem.
in case it halps someone else:
1) in teh file activity_get1.php I added the code that checks if id==0 and in that case i print an empty SELECT
if($id == 0)
{
echo “”;
}
Â
2) in the event onSelectRow, before placing the row in edit mode, I added the following code:
$(“#” + subgrid_table_id).setColProp(‘HID_ACT_id’, { editoptions: { dataUrl:’activity_get1.php?id=’ + rowId }});
so in the file activity_get1.php I can retrieve the value of the column HID_CDC_id saved in the database (this because i don’t care about the changes of that SELECT because they are already managed in the relative part of code)
Â
3)then i removed all the other parts of code that worked with the select HID_ACT_id in particular i removed all the following code:
 $.get(‘activity_get1.php?id=’ + rowId, function(data) {
       var res = $(data).html();
       var select_id = “#” + rowId + “_HID_ACT_id”;
       //alert(res);
      $(select_id).html(res);
     });
Â
anyway thanks for the support tony! great plugin!!!
First of all thanks for your reply.
I read the code of the demo 10 times and tried to change many things in my code but I couldn’t get the solution… I didn’t get the point unfortunately.
I think the problem is the inline editing because ad I can see in the demo if I used the “form” edit mode i’d be able to make the trick.
I tried mostly everything but in any case SOMETIMES the code doesn’t reach the desired SELECT. (like 10% of times i click on a row to enter in edit mode the 2nd SELECT remains empty)
I tried:
jQuery(“#” + rowId + ‘_HID_ACT_id’).html(“”);
jQuery(“#” + rowId + ‘_HID_ACT_id’).html(res);
or
$(“#” + rowId + ‘_HID_ACT_id’).html(res);
or
//this 10% of times i click gives me the error i posted above
document.getElementById(rowId + ‘_HID_ACT_id’).innerHTML = res;
or even
$(“#” + subgrid_table_id).setColProp(‘HID_ACT_id’, { editoptions: { value: data} });
or even
setInterval(function() {$(select_id).html(res);}, 100);
Â
nothing solved the problem.
Â
please, help me becuse i’m stuck.
Â
PS. I even tried to remove the EDITOPTION from the column HID_ACT_id and populate it programmatically in the OnSelectRow event, but I can’t because without that part the SELECT doesn’t have an ID and therefore i cannot reach it.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top