bibi
1
Hello, I want to round the value of the data in the grid column "dauer" to quarters (.25, .5, .75, .00).
This is the custom method I wrote:
public IActionResult Round(double x)
{
var round = Math.Round(x/0.25)*0.25;
return Json(new { round });
}
I don´t know how to display the result of the calculation in the datagrid column only for sight purpose, it shouldnt change the data itself.
korchev
2
You can try using the number Angular pipe. Or try using the Math object in a similar way (although it is a bit complicated in Angular).
-
Create a property with Name math and Value Math in your Radzen page.
-
Set the Template of your DataGrid column to ${math.round(data.PropertyName / 0.25) * 0.25}
1 Like
bibi
3
Thank you so much, it works now!