jQWidgets Forums

jQuery UI Widgets Forums Grid Tooltip on jqxgrid filter

This topic contains 3 replies, has 2 voices, and was last updated by  Dimitar 11 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Tooltip on jqxgrid filter #52532

    vls
    Participant

    I need to show tooltip on the filter on the jqxgrid. Is it possible? Can you please help on this?

    Tooltip on jqxgrid filter #52553

    Dimitar
    Participant

    Hello vlsuryadevara,

    Please clarify your question – where exactly do you need a tooltip – on the filter icon, in the filter menu or somewhere else?

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Tooltip on jqxgrid filter #52661

    vls
    Participant

    Tooltip on the filter. I have a filter on the date column where I entered the date range but the entire text is not visible. So I want to show the entered text as tooltip. This is want I would need. Please help me

    Tooltip on jqxgrid filter #52671

    Dimitar
    Participant

    Hi vls,

    I assume you refer to the filter row. Here is an example:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
        <script type="text/javascript" src="../../scripts/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxgrid.filter.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxgrid.sort.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxpanel.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcalendar.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdatetimeinput.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcheckbox.js"></script>
        <script type="text/javascript" src="../../jqwidgets/globalization/globalize.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxtooltip.js"></script>
        <script type="text/javascript" src="../../scripts/demos.js"></script>
        <script type="text/javascript" src="generatedata.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                var data = generatedata(500);
                var source =
                {
                    localdata: data,
                    datafields:
                    [
                        { name: 'name', type: 'string' },
                        { name: 'productname', type: 'string' },
                        { name: 'available', type: 'bool' },
                        { name: 'date', type: 'date' },
                        { name: 'quantity', type: 'number' }
                    ],
                    datatype: "array"
                };
    
                var dataAdapter = new $.jqx.dataAdapter(source);
    
                $("#jqxgrid").jqxGrid(
                {
                    width: 850,
                    source: dataAdapter,
                    showfilterrow: true,
                    filterable: true,
                    selectionmode: 'multiplecellsextended',
                    ready: function () {
                        var filterCells = $("#jqxgrid .jqx-grid-cell-filter-row");
                        var dateFilterCell = $(filterCells[4]);
                        dateFilterCell.jqxTooltip({ content: "No filter applied" });
                        dateFilterCell.mouseover(function () {
                            var newContent = $("#jqxgrid .jqx-grid-cell-filter-row:eq(4) input").val();
                            if (newContent == "") {
                                dateFilterCell.jqxTooltip({ content: "No filter applied" });
                            } else {
                                dateFilterCell.jqxTooltip({ content: newContent });
                            };
                        });
                    },
                    columns: [
                      { text: 'Name', columntype: 'textbox', filtertype: 'textbox', filtercondition: 'starts_with', datafield: 'name', width: 215 },
                      {
                          text: 'Product', filtertype: 'checkedlist', datafield: 'productname', width: 220
                      },
                      { text: 'Available', datafield: 'available', columntype: 'checkbox', filtertype: 'bool', width: 67 },
                      { text: 'Ship Date', datafield: 'date', filtertype: 'date', width: 110, cellsalign: 'right', cellsformat: 'd' },
                      { text: 'Qty.', datafield: 'quantity', filtertype: 'number', cellsalign: 'right', filterable: false }
                    ]
                });
                $('#clearfilteringbutton').jqxButton({ height: 25 });
                $('#clearfilteringbutton').click(function () {
                    $("#jqxgrid").jqxGrid('clearfilters');
                });
            });
        </script>
    </head>
    <body class='default'>
        <div id="jqxgrid">
        </div>
        <input style="margin-top: 10px;" value="Remove Filter" id="clearfilteringbutton"
            type="button" />
    </body>
    </html>

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.