Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

281
Views
How can I make texts highlightable in ExtJs?

I'm still finding my way around Extjs, I'm currently displaying text data to a UI like so:

reference: 'agentLogGrid',

    store: {
        xclass: 'Ext.data.ChainedStore',
        source: 'LogViewSource',
    },

    itemConfig: {
        viewModel: true,
    },

    columns: [{
        text: 'Timestamp',
        xtype: 'templatecolumn',
        tpl: '{timestamp}',
        flex: 1,
    }, {
        text: 'Data',
        xtype: 'templatecolumn',
        tpl: '{data}',
        flex: 1,
    }],...

But the texts are not highlightable, that means I can't highlight them and copy, or select and copy. When I mouse over, the pointer sees it as a link, but I can't highlight or select. How do I make just the {data} highlightable?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In classic toolkit you can use enableTextSelection property. Something like this:

Ext.application({
    name: 'Fiddle',

    launch: function () {
        Ext.create('Ext.data.Store', {
            storeId: 'employeeStore',
            fields: ['firstname', 'lastname', 'seniority', 'department'],
            groupField: 'department',
            data: [{
                firstname: "Michael",
                lastname: "Scott",
                seniority: 7,
                department: "Management"
            }, {
                firstname: "Dwight",
                lastname: "Schrute",
                seniority: 2,
                department: "Sales"
            }, {
                firstname: "Jim",
                lastname: "Halpert",
                seniority: 3,
                department: "Sales"
            }, {
                firstname: "Kevin",
                lastname: "Malone",
                seniority: 4,
                department: "Accounting"
            }, {
                firstname: "Angela",
                lastname: "Martin",
                seniority: 5,
                department: "Accounting"
            }]
        });

        Ext.create('Ext.grid.Panel', {
            title: 'Column Template Demo',
            store: Ext.data.StoreManager.lookup('employeeStore'),
            columns: [{
                text: 'Full Name',
                xtype: 'templatecolumn',
                tpl: '{firstname} {lastname}',
                flex: 1
            }, {
                text: 'Department (Yrs)',
                xtype: 'templatecolumn',
                tpl: '{department} ({seniority})'
            }],
            // USE viewConfig enableTextSelection property
            viewConfig: {
                enableTextSelection: true
            },
            height: 200,
            width: 300,
            renderTo: Ext.getBody()
        });
    }
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!