Jump to content

Double-Click event of the UniDbGrid column header


Ario.Paxaz

Recommended Posts

3 hours ago, A.Soltani said:

How to get the double-click event of the UniDbGrid column header(only header and not cell or body)?

function afterrender(sender, eOpts)
{
    sender.headerCt.el.on('dblclick', function() {
        ajaxRequest(sender, 'headerdblclick', []);
    });
}

 

  • Like 2
Link to comment
Share on other sites

1 hour ago, A.Soltani said:

How to get a double-clicked column index?

Hi,

 

function afterrender(sender, eOpts)
{
    sender.headerCt.el.on('dblclick', function() {
        ajaxRequest(sender, 'headerdblclick', []);
    });
}

 

function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts)
{
    columns.forEach(function(col) {
        if (col.titleEl) {
            col.titleEl.on('dblclick', function() {
                ajaxRequest(sender, 'headerdblclick', ['colIndx=' + col.dataIndex]);
            })
        }
    });
}

 

Link to comment
Share on other sites

Hi,

14 minutes ago, A.Soltani said:

This is my TestCase.

 

Regards.

UniDBGridHeaderDblClick.rar 1.39 MB · 0 downloads

Thanks.

 

Can you try to use this approach?

function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) 
{
    columns.forEach(function(col) {
        if (col.titleEl) {
            col.titleEl.on('dblclick', function() {
                ajaxRequest(sender, 'headerdblclick', ['colIndx=' + col.dataIndex]);
            })
        } else if (col.columns) {
            col.columns.forEach(function(col) {

                if (col.titleEl) {
                    col.titleEl.on('dblclick', function() {
                        ajaxRequest(sender, 'headerdblclick', ['colIndx=' + col.dataIndex]);
                    })
                }
            })

        }
    });
}

 

Link to comment
Share on other sites

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...