Sohaib (may Allah be pleased with him) reported: The Messenger of Allah (may Allah's peace and blessings be upon him) said:
"How astonishing the believer's affair is! Indeed, all of his affairs are good, and this is for none but the believer. If something good happens to him, he is grateful, which is good for him; and if something bad happens to him, he shows patience, which is good for him."
Reported by Muslim (No. 2999) and Ahmad (No. 18171, 18175, 22798).
The Prophet (may Allah's peace and blessings be upon him) expresses wonder, by way of admiration, at the believer's affairs and conditions because all of his conditions are good, and this is for none except the believer. Whenever something good happens to him, he thanks Allah for it and gets rewarded for showing gratitude. If something bad happens to him, he shows patience and seeks reward from Allah and, thus, gets rewarded for showing patience. So, he gets rewarded in all cases.
Lessons
The merit of showing gratitude in prosperity and patience in adversity is that whoever does this will attain goodness in both abodes. However, one who neither shows gratitude in the case of blessings nor patience in the case of calamities will miss the reward and incur sin.
The merit of Imān (faith) and the fact that reward in all cases is for none but for those who have faith.
Showing gratitude at times of prosperity and patience at times of adversity are from the believers' characteristics.
Belief in Allah's decree and predestination makes the believer perfectly content with all of his conditions, unlike the non-believer, who is constantly discontented when experiencing hardship, and if he receives a blessing from Allah Almighty, he becomes preoccupied with it and gets distracted from obeying Allah, let alone using such a blessing in disobeying Him.
Explanation in Arabic
يَتَعَجَّبُ صلى الله عليه وسلم مِن شأن المؤمن وأحواله على وجه الاستحسان؛ وذلك لأن أحواله كلها خير، وليس ذلك لأحد إلا للمؤمن؛
إن أصابته سرّاءُ شكرَ اللهَ عليها؛ فيحصل له الأجر بالشكر،
وإن أصابته ضراءُ صبرَ واحتسب الأجر على الله، فيحصل له الأجر بالصبر، فهو في أجر على كل حال.
فضل الشكر على السراء والصبر على الضراء، فمَن فعَلَ ذلك حصل له خير الدارين، ومن لم يشكر على النعمة، ولم يصبر على المصيبة، فاته الأجر، وحصل له الوزر.
فضل الإيمان، وأنّ الأجر في كل حال لا يكون إلا لأهل الإيمان.
الشكر عند السراء، والصبر على الضراء من خصال المؤمنين.
الإيمان بقضاء الله وقدره يجعل المؤمن في رضا كامل على كل أحواله، بخلاف غير المؤمن الذي يكون في سخط دائم عند وقوع ضرر عليه، وإذا ما حاز نعمة من الله عز وجل انشغل بها عن طاعة الله، فضلًا عن صرفها في معصيته.
Scholars’ grades
Grade taken from the status of the collection (Sahih Muslim).