jQWidgets Forums

jQuery UI Widgets Forums Grid CreateWidget & InitWidget Prevents sorting

This topic contains 1 reply, has 1 voice, and was last updated by  jeffo 8 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • jeffo
    Participant

    I have a requirement to implement the text in a column as an link to another page. I have successfully managed this requirement by implementing the createwidget function.

    createwidget: function (row, column, value, cellElement) {
                            var $el = $(cellElement);
    
                            $el.removeClass('jqx-grid-widget').addClass('jqx-grid-cell-left-align').attr('style', '').css('margin-top', '4px').append($('<a />').attr('href', 'http://www.someaddresshere.com').html(value));
    
                        }

    because I do not require init widget, but it is mandatory, I have implemented an empty function:

    initwidget: function (row, column, value, cellElement) { }

    However now whenever I attempt to sort the grid by clicking on any of the header columns, all other columns will sort, but this column does not get redrawn.

    Is there a way around this?


    jeffo
    Participant

    Its OK. I seemed to have sorted it.

    I have implemented initwidget,

    initwidget: function (row, column, value, cellElement) { 
      var $el = $(cellElement);
    
      $el.removeClass('jqx-grid-widget').addClass('jqx-grid-cell-left-align').attr('style', '').css('margin-top', '4px').empty().append($('<a />').attr('href', 'http://www.someaddresshere.com').html(value));
    }

    However, row seems to be inconsistent in implementation between containing row id and row object.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.