In my previous blog post I explained how to display RadGridView Row Details with a RadWindow. Several days after the post was published I received a suggestion to create another sample that will be showing Row Details in a mouse-over tooltip fashion. And guess what. Christmas came earlier this year.
The full credit for coming up with this brilliant idea goes to my friend and colleague Kalin Milanov, our Front-end Developer. He decided to edit the GridViewRow ControlTemplate and removed the DetailsPresenter from the spot it usually occupies under the cells. He then placed it inside a ToolTip:
There was a minor problem though. Row Details are collapsed, unless specified otherwise. So we attached to the Opened and Closed events of the ToolTip, found the respective GridViewRow and made its details Visible or Collapsed respectively:
Unfortunately, the ugly casting and searching above was inevitable. I wish the Owner property of the ToolTip class was public. Please, Microsoft, at least the getter. Anyway, here is what we got (it may take a while to load):
I just love ControlTemplates. Fabulous stuff.
You can get the full source code from here.
Subscribe to be the first to get our expert-written articles and tutorials for developers!
All fields are required