Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9254285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:25:45+00:00 2026-06-18T11:25:45+00:00

I´m trying to renderer a string in my column instead of your id. I

  • 0

I´m trying to renderer a string in my column instead of your id. I founded this solution: Grid cell is rendering wrong, but it´s don´t work with a dynamic store.

In my grid I put a store to load into the renderer:

columns: [
                  {xtype : 'gridcolumn', text: 'Id', dataIndex: 'id'},
                  {xtype : 'gridcolumn', text: 'Validade', dataIndex: 'dataValidade', renderer: function(object){return Ext.Date.format(object, 'd-m-Y');}},
                  {xtype : 'gridcolumn', text: 'Complexo', dataIndex: 'id', renderer: function(value) {
                        storeComplexoPorValidade.getProxy().url = caminhoContexto + "validade/complexoporid/" + value + "/dados.json";
                        storeComplexoPorValidade.load();
                        console.log(storeComplexoPorValidade);
                        var idx = storeComplexoPorValidade.find('id', value);
                        var rec = storeComplexoPorValidade.getAt(idx);
                        return rec.get('descricao');  
                        }
                  },

But the store don´t load the data to var, although perform the request. And I catch the error: Cannot call method ‘get’ of undefined.

What´s wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:25:47+00:00Added an answer on June 18, 2026 at 11:25 am

    Thanks for your help, I have a lot work to make my script work. And with your tips I founded two others solutions that help me to put my code working. How to wait until all stores are loaded in ExtJs? and http://www.sencha.com/forum/showthread.php?197265-Loading-stores-synchronously

    It´s my code working:

    Ext.define('validade', {
    extend: 'Ext.data.Model',
    fields: [{name: 'id', type: 'int'},
             {name: 'dataValidade', type: 'date', dateFormat:'Y-m-d'},
             {name: 'complexo', type: 'string', persist: 'false' }]         
    

    });

    Ext.define('ValidadeStore',{
    extend: 'Ext.data.Store',
    model: 'validade',
    pageSize: itemsPerPage,
    remoteSort: true,
        sorters: [{
            property : 'id',
            direction: 'DESC'
        }],
    proxy: {
        type: 'ajax',
        url : '/validade/grid/dados.json',
        reader : {
            type : 'json',
            root : 'data'
        },
    },
    autoLoad: {
        callback: function(records, operation, success){
            var i = 0
    
            loadComplexo();
    
            function loadComplexo(){
                if (i < records.length) {
                    var rec = records[i];
                    i++;
                    storeComplexo.getProxy().url = "validade/complexoporid/" + rec.get('id') + "/dados.json";
                    storeComplexo.load({
                        callback: function(records, operation, success){
                            var rec_ = records[0];
                            rec.set('complexo',rec_.get('descricao'));
                            loadComplexo();
                        }
                    });
                }
            }
        }
    }
    

    });

    Thanks a lot!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying a renderer function like this: pdfRenderer: function(value, metaData, record, rowIndex, colIndex,
I've been trying to create a custom renderer based on this Yehuda Katz's blog
I'm trying to create a custom cell renderer that will display an image in
EXTJS 4 - I am trying to customize the renderer function for the 'series'
I've been trying to make my own basic .obj (Wavefront) renderer using the OpenGL
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
Trying to figure out how I can do this properly. The print_r looks like
I've been following tutorials, learning this whole thing about JTable Renderers/Editors, but I got
I'm really new to web developing...I'm trying to draw area graph on JSP (this
I'm trying to add an icon to a particular JTable column by specifying my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.