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

Apply row styles to grid with MVC server binding

1 Answer 8 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 15 Feb 2017, 05:58 PM

Hello there.  

After figuring out that client-side events (e.g., dataBound) do not work with server binding, I'm left wondering what is the best way to apply row styles based on row values with server binding.

For example, if an integer value in a row (salesAmount) is below a certain threshold, how would I apply a particular style to that entire row?

(ref: http://www.telerik.com/forums/databound-event-doesn-t-fire-if-server-binding-is-used)

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 17 Feb 2017, 12:54 PM
Hello Steve,

When the Grid is served bound, a function which is usually executed on dataBound can be executed inside a document.ready()  function after the Grid initialization:

//Grid initialization
 
$(document).ready(function() {
 styleGrid();
});

I hope this is helpful.

Regards,
Stefan
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Tom
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or