Talk show host Ellen DeGeneres surprised Texas teen DeAndre Arnold with a $20,000 scholarship during a recent appearance on "Ellen."

School officials told DeAndre, a 17-year-old student at Barbers Hill Independent School District, that he would not be able to participate in graduation events if he refused to cut his lengthy dreadlocks. Officials also suspended DeAndre after he refused to cut his dreadlocks — which the family says is part of their Trinidadian heritage — in order to be in compliance with school dress code.

His story ended up going viral, but the district says there's more to the story.

What are the details?

DeAndre appeared on Wednesday's broadcast, where entertainer Alicia Keys appeared in order to gift him the $20,000 scholarship.

DeGeneres spoke to DeAndre, telling him that she understood his struggle.

"Let's say you want to go back to school tomorrow," DeGeneres said. "What happens?"

DeAndre pointed out that if he chose to go back to school, he would either be placed in school suspension, or shuffled over to an "alternative school."

"Alternative school," he explained, "is where all the kids that have behavioral issues, sell drugs, fight all the time. ... I wish them the best, and I know that they have good qualities in them, but I don't deserve to be grouped with them."

DeGeneres agreed.

"No," she responded. "You have good grades. You don't do drugs. You don't do any of that. And they won't allow you to walk in graduation, which is the biggest — you get that far through school, and you want to walk graduation."

DeAndre said that he worked hard his entire life and he feels cheated out of being excluded from graduation.

"I've worked for this all my life," he answered. "I've strived for this. I deserve this moment, to walk across stage and enter into life. My parents deserve this. ... They're the ones who, you know, they got me through everything. And, you know, they just taught me everything. They deserve to see me walk across the stage."

Later in the segment, DeGeneres issued a public plea to the school district, encouraging it to "do the right thing."

Keys appeared with the check a short while later and addressed DeAndre directly.

"I want to tell you that I couldn't believe the story when I heard it," she said. "And I'm super proud of you for standing up for what you know is right. And I know that the school needs to do the right thing."

What is the district saying?

At the time of this writing, Barbers Hill ISD is sticking to its guns and insisting that the length of DeAndre's dreadlocks are simply not within the scope of the long-standing dress code.

"[W]e absolutely allow dreadlocks," a representative told The Hill in a statement. "What we do not allow is any action that circumvents or violates the provision regarding hair length."

However, the statement added, "The student in question was NEVER forbidden from attending school."

Still, DeAndre and his family are not budging at this point.

“It's part of our culture and our heritage," the teen told DeGeneres said. “And I really wish the school would kind of be open to other cultures, and just at least let us try to tell you some things. Don't just shut us out."