Method for mounting a panel to a wiring cabinet using at least one fastening element, wherein the wiring cabinet comprises at least one frame profile, wherein the panel has an upper end and a lower end, and wherein the panel has a rear surface and a front surface, the method comprising: - attaching the panel to the wiring cabinet into a premounted state, wherein the rear surface of the panel is in contact with the frame profile; - fastening the panel to the wiring cabinet by means of the fastening element, wherein the fastening element is inserted through an opening in the panel and an opening in the frame profile, and wherein the panel is held to the frame profile by the engagement of the fastening element with the frame profile wherein the fastening element comprises an expanding rivet with an opening, and further comprises an expanding body, wherein the expanding rivet has at least two rivet legs, wherein fastening the panel comprises inserting the expanding rivet in an insertion direction through the opening in the panel and the opening in the frame profile, and inserting the expanding body into the opening of the expanding rivet so that the rivet legs are forced apart in such a way, that the rivet legs engage the frame profile, characterized in that the expanding rivet has at least one second protrusion, which protrudes radially from the expanding rivet, wherein the opening in the panel comprises a circular hole that has at least one radial recess, through which the second protrusion is inserted while inserting the expanding rivet through the opening in the panel, wherein after insertion of the expanding rivet through the opening in the panel and rotation around a rotational axis of the expanding rivet the second protrusion sits below the panel and retains the expanding rivet to the panel in a direction opposite to the insertion direction.. - attaching the panel to the wiring cabinet into a premounted state, wherein the rear surface of the panel is in contact with the frame profile; - fastening the panel to the wiring cabinet by means of the fastening element, wherein the fastening element is inserted through an opening in the panel and an opening in the frame profile, and wherein the panel is held to the frame profile by the engagement of the fastening element with the frame profile wherein the fastening element comprises an expanding rivet with an opening, and further comprises an expanding body, wherein the expanding rivet has at least two rivet legs, wherein fastening the panel comprises inserting the expanding rivet in an insertion direction through the opening in the panel and the opening in the frame profile, and inserting the expanding body into the opening of the expanding rivet so that the rivet legs are forced apart in such a way, that the rivet legs engage the frame profile, characterized in that the expanding rivet has at least one second protrusion, which protrudes radially from the expanding rivet, wherein the opening in the panel comprises a circular hole that has at least one radial recess, through which the second protrusion is inserted while inserting the expanding rivet through the opening in the panel, wherein after insertion of the expanding rivet through the opening in the panel and rotation around a rotational axis of the expanding rivet the second protrusion sits below the panel and retains the expanding rivet to the panel in a direction opposite to the insertion direction..