Anand
|
| Posted: 03/01/2005, 12:40 AM |
|
Hi,
I do have a editable grid (using php by the way). In this grid depending on some results in the DB (mysql) I want do make a text field readonly or not. Everything is working but the thing is how can I set the textfield readonly from php code?
Please help 
Cheers, Anand.
|
|
|
 |
mrachow
Posts: 509
|
| Posted: 03/01/2005, 1:13 AM |
|
One solution should be to place TextBox and a Label (bound to the same database column) into a table cell.
Depending on your condition make the one visible and hide the other.
_________________
Best regards,
Michael |
 |
 |
Nicole
Posts: 586
|
| Posted: 03/01/2005, 4:20 AM |
|
Anand,
You can locate a custom template variable inside textbox HTML code and replace it with "readonly" keyword in Before Show Row event if necessary.
global $Tpl;
if ($condition_to_make_readonly)
$Tpl->SetVar("var_name", "readonly");
_________________
Regards,
Nicole |
 |
 |
|