This is a migrated thread and some comments may be shown as answers.

Refresh (invalidate, repaint, redraw) one row

1 Answer 180 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Matjaz
Top achievements
Rank 1
Matjaz asked on 07 Apr 2015, 08:14 PM

I am using tree list for internal messaging on my web page. If message is unread I mark entire row with bold. (I use column.template.):

                

columns: [
                {
                    field: 'subject', title: Translate.Messages.Subject, template: '#if (!readed) {# <strong> #: subject #</strong># } else { # #: subject # #}#'
                },

On click I show message details at the same time I would like to mark row as readed (remove strong). Is there an easy way to repaint/redraw one row. Of course I would first edit appropriate dataItem.

1 Answer, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 09 Apr 2015, 08:07 AM

Hello Matjaz,

You can use the setter of the row dataItem in the change event:

  change: function(e) {
    var dataItem = this.dataItem(this.select());
    dataItem.set("read", true);
  }

See this Dojo snippet for a working example.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeList
Asked by
Matjaz
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or