Hello Abhi
you can do it by get_i fields of attribute and also with view_group_context->set_all_editable( )..
For more detail check SAP CRM WEB UI : 47.UNDERSTANDING VIEW GROUP CONTEXT
and also take a look into CRM 7 enable and disable an assignment block | SCN
Hope it will help.
Regards Harish Kumar