Hi nico,
first of all I always prefer to see a bit of code to better understand,
however..
... all custom html code will be printed in raw text...
this is not true for datagrid, never for some fields on dataedit (container / free field).
basically a datagrid-column before output is "sanitized" using htmlspecialchars but not if you use a field "pattern" or a callback function.
some code:
...
//by field name, in this case htmlspecialchars is applyed
$grid->column('title','Title');
//by field pattern, in this case no so you can also output html
$grid->column('{title} <em>created:</em>{date}','Title and date');
//by callback, never in this one, so youre free to decide output in your method
$grid->column('body','Title and date')->callback('abbr',$this);
...
the last one, the callback way, can be used also to check user and decide to return a "edit link" for users with right permissions. The callback example is on first page of rapyd framework
http://test.rapyd.com/grid/index
and if you have time..
in rapyd cms there is a similar situation (user management, to prevent root user deletion).