Hi there, I have a columns on grid called 'Status' and 2 others, called A & B. The status column is a select with A & B the options. If user selects A I would like todays date inserted into A, if they select B again today's date and so on. Is this possible within the grid at all?
Thanks
1 Answers
You can bind onclick event of status 'select' input. And in JS callback check the value of dropdown and set the input text field.
$col["editoptions"] = array("onclick" => "update_field(this)");
e.g. (just to give idea)
function update_field(d)
{
if (d.value == 'A') jQuery('#A').val(123);
else jQuery('#B').val(123);
}
#A, #B are input field selector of field with col names A and B.
Your Answer