Filter textboxes show empty tooltips with TooltipManager autotooltipify

5 posts, 0 answers
  1. Massimiliano
    Massimiliano avatar
    184 posts
    Member since:
    Oct 2012

    Posted 13 Jul 2013 Link to this post

    I know I'm sort of "taking over" the Grid forum :) But first I do every search possible in old forum posts, in the demos, in the code base and in the on-line docs.
    I just hope many of those issues when solved will be helpful to other users as well or maybe (who knows) give suggestions for bugfixes or new features.

    Anyway... as stated in the topic it seems that when you have a ToolTipManager on the page with AutoTooltipify="true", filter columns textboxes all show empty Tooltips. I don't want to add "meaningful" tooltips such as "Write your filter here" since I think cluttering the page with tooltips is counter-productive.
    Setting the tooltip text to ""  in aspx column declaration doesn't solve the problem
    Any solution?
    Also I inspected the input element and it seems it has no tooltip, no title and no alt attribute so why this empty tooltip shows up?

    Also I couldn't seem to find a way to localize the "open calendar popup" picker tooltip (and his little brother time picker) 

    Thanks in advance
  2. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 18 Jul 2013 Link to this post

    Hello Massimiliano,

    Generally a tool tip should be displayed as an alt attribute is automatically added to the input. Could you please show us your markup and code-behind so we could investigate further?

    As for localizing the picker tooltip you can use this code:
    <telerik:RadDatePicker runat="server" ID="Picker1">
                <DatePopupButton ToolTip="My picker ToolTip" />
            </telerik:RadDatePicker>

    Regards,
    Angel Petrov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Massimiliano
    Massimiliano avatar
    184 posts
    Member since:
    Oct 2012

    Posted 18 Jul 2013 Link to this post

    Hallo Angel, thank you for getting back. I know I'm spamming the forum lately but I'm just testing/developing your incredible control suite so I guess it's normal, and I hope  many of those topics could be useful for other users as well.
    Anyway... about the empty tooltip with autotooltipify on here is my markup for one column:

    <telerik:GridBoundColumn UniqueName="UserName" DataField="UserName" DataType="System.String"
    HeaderText="Nome utente" ColumnGroupName="Anagrafica" HtmlEncode="true" ShowFilterIcon="true"
    FilterImageToolTip="" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith"
    ConvertEmptyStringToNull="true" FilterControlWidth="70%" ItemStyle-CssClass="RadGridBatchEditInput">
    </
    telerik:GridBoundColumn>

    In code behind nothing special happens on the filter textboxes.
    The resulting HTML is:

    <input name="ctl00$MainContent$RadGrid1$ctl00$ctl02$ctl04$FilterTextBox_UserName" type="text" size="10"
    id="ctl00_MainContent_RadGrid1_ctl00_ctl02_ctl04_FilterTextBox_UserName"
    class="rgFilterBox rfdRoundedCorners rfdDecorated"
    alt="Filter UserName column"
    onchange="$find("ctl00_MainContent_RadGrid1_ctl00")._filterNoDelay("ctl00_MainContent_RadGrid1_ctl00_ctl02_ctl04_FilterTextBox_UserName","UserName")"
    onkeypress="if(event.keyCode == 13){ this.blur(); event.cancelBubble = true; event.returnValue = false; if (event.stopPropagation){ event.stopPropagation(); event.preventDefault();} $find("ctl00_MainContent_RadGrid1_ctl00")._filterNoDelay("ctl00_MainContent_RadGrid1_ctl00_ctl02_ctl04_FilterTextBox_UserName","UserName") }"
    style="width:70%;">

    Ok there is an ALT attribute wich I had missed but I have set the IgnoreAltAttribute="true" property on tooltipmanager so it shouldn't show anything right? Not even an empty tooltip.

    About the localization of the picker, since it is in a GridDateTimeColumn I guess I have to check that in the ItemCreated event, check for the filter item, check for the picker inside that column and set the DatePopupButton.
    This is a generic iteration that localizes all pickers tooltips inside the GridDateTimeColumn inside the ItemCreated event of RadGrid

    Protected Sub RadGrid1_ItemCreated(sender As Object, e As GridItemEventArgs) Handles RadGrid1.ItemCreated
                Dim grid As RadGrid = DirectCast(sender, RadGrid)
     
                ' Tweak filter items
                If TypeOf e.Item Is GridFilteringItem Then
                    Dim fltItem As GridFilteringItem = DirectCast(e.Item, GridFilteringItem)
     
                    ' Localize datepicker tooltips
                    For Each column As GridColumn In grid.Columns
                        If column.ColumnType.ToString() = "GridDateTimeColumn" Then
                            DirectCast(fltItem(column.UniqueName).Controls(0), RadDatePicker).DatePopupButton.ToolTip = "Apri il calendario"
                        End If
                    Next
                End If
     
       End Sub
  5. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 23 Jul 2013 Link to this post

    Hello Massimiliano,

    After investigating the problem more thoroughly it proved to be a bug in the implementation of the RadToolTipManager. We have already logged it into our system and you can monitor it's progress from here. Our developers will do their best to provide a fix as soon as possible.

    Thank you for reporting this issue to us. As a token of gratitude I have updated your Telerik Points.

    As for the localization of the picker, the approach demonstrated is correct and you should not experience any troubles integrating it.

    Regards,
    Angel Petrov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  6. Massimiliano
    Massimiliano avatar
    184 posts
    Member since:
    Oct 2012

    Posted 23 Jul 2013 Link to this post

    Hallo Angel,
    glad I could be of any help in improving the suite consistency. By the way I moved away from autotooltipify="true" to the ToolTipManager target controls wich is awesome and gives you full control on what to tooltipify and what not!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017