I assume you are on MSSQL, but you could have mentioned that in your posting.
The problem may be that HeidiSQL misdetects your primary key columns, and/or the MSSQL version is so old that HeidiSQL has problems with it. The query which is responsible for detecting keys is as follows:
SELECT C.CONSTRAINT_NAME, C.CONSTRAINT_TYPE, K.COLUMN_NAME
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS C
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS K ON
C.CONSTRAINT_NAME = K.CONSTRAINT_NAME
AND K.TABLE_NAME='YOUR-TABLE-NAME'
AND K.TABLE_SCHEMA='dbo'
WHERE C.CONSTRAINT_TYPE IN ('PRIMARY KEY', 'UNIQUE')
ORDER BY K.ORDINAL_POSITION;
Please check what that query returns for your table and post it here, preferably as Markdown Here export which is compatible to this forum.