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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...