Drawer Item tooltip?

2 Answers 340 Views
Drawer
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
Deasun asked on 04 Nov 2022, 07:38 PM

Anyway to add a tooltip hint to the drawer item?

Popsup when the mouse hovers over it!

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
answered on 10 Nov 2022, 01:59 PM
My answer in the comment above.
0
Dimo
Telerik team
answered on 09 Nov 2022, 12:44 PM

Hi Deasun,

Yes, you can integrate the Tooltip component with the Drawer items. The question is what to show in it. The Tooltip works with title and data attributes of its target and the Drawer items don't have these.

So you can use a Drawer ItemTemplate or a Template to render the information that you will then use inside the Tooltip.

Regards,
Dimo
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
commented on 10 Nov 2022, 01:58 PM

I ended up doing the following:

Theres the hint in action, from the code below.

 

 public class DrawerItem
    {
        public string Title { get; set; }  // this becomes the popup hint I was looking for.


        public string Text { get; set; }

        public string Icon { get; set; }

        public string Url { get; set; }

        public bool Separator { get; set; }

        public IEnumerable<(string, string)> AdditionalData { get; set; }
    }

public IEnumerable<DrawerItem> Data { get; set; } =
        new List<DrawerItem>
                {
            new DrawerItem
            {
                Title = "Home",
                Text = "Home",
                Icon = "home",            
                Url="./"
            },
            new DrawerItem { Separator = true},
            new DrawerItem
            {
                Title = "CostTN Search",
                Text = "CostTN Search",
                Icon = "search",
                Url="TNSearch"
            },
            new DrawerItem
            {
                Title = "RevIOTN Search",
                Text = "RevIOTN Search",
                Icon = "search",
                Url="RevIOTNSearch"
            },
            new DrawerItem
            {
                Title = "TN Mapping",
                Text = "TN Mapping",
                Icon = "subreport",
                Url="TNMapping"
            },
            new DrawerItem
            {
                Title = "Load Stats",
                Text = "Load Stats",
                Icon = "subreport",
                Url="LoadStats"
            },
            new DrawerItem { Separator = true},
                    };

 

Tags
Drawer
Asked by
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
Answers by
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
Dimo
Telerik team
Share this question
or