Solution 1: Bind the Enabled property of the LinkButton to the flag field from the database.
Solution 2:
RowDataBound
Event is fired when a GridView row gets bound. You can use this event. You will basically get the value of the flag, find your control and enable/disable it based on the flag value. Read more on this event in
MSDN[
^].