Dependant grids - Add/Update - set hidden field with default value

greetings Johnny 2, questions

1-how could I modify the content of a status column, for example, when 0 comes from the database, ‘ACTIVE’ should appears, if 1 comes then ‘INACTIVE’
2-I have a crud of buildings in which I add a button in each record with the id of the building that goes to a function to show the apartments of that building, so far everything is fine, when inserting/modifying, how can I avoid that the user has to select the building and put that field hidden with a defaults value(building_id) that I already have

thanks for your time