Results 1 to 2 of 2

Thread: Grid's cell async render doesn't work

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Apr 2012
    Vote Rating

    Default Grid's cell async render doesn't work

    Some properties for the model I use in my Grid are references.
    I need to fetch asynchronously the real value in the corresponding cell.
    ColumnConfig<ArticleModel,String> column = new ColumnConfig<ArticleModel,String>(props.sectionId(), 110, "Section");
    column.setCell(new AbstractCell<String>() {
        public void render(Context context, String sectionId, final SafeHtmlBuilder safeHtmlBuilder) {
            asyncService.getSection(sectionId, new AsyncCallback<SectionModel>() {
                public void onFailure(Throwable throwable) {}
                public void onSuccess(SectionModel sectionModel) {
    The value is well fetched but the cell doesn't render it.

    Should I use another way of doing it ? Or is it a bug ?
    Thanks !

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Vote Rating


    You almost certainly do not mean to be doing this - you are telling the grid to make an RPC call for every cell to be drawn in this way. Even if you only have a dozen rows to draw, and only use this setup in a single column, that is still 12 calls that will go off at once - and chances are your browser will only allow 2-8 of those to run at a time (depending on the browser, version). Add in something like paging or updating items, and you are looking at a lot of traffic.

    Additionally, SafeHtmlBuilder is like StringBuilder - you can use it to append a bunch of items, then turn the whole collection into a string. The code that created the SafeHtmlBuilder is not waiting until every possible RPC call has finished to create content and append it to the dom.

    Why are these items not loaded into the models themselves? They all still need to be loaded before the grid can be drawn. If you are loading the basic items themselves first, and deferring loading part of each item, you could make that call just before the grid is drawn, update or modify the rows, then draw the grid.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts