Hi daniil,with your example I try
Example View
<script type="text/javascript">
Ext.util.Format.indianMoney = function (v) {
v = String(v).replace(/[^0-9.\-]/g, "");
v = (Math.round((v - 0) * 100)) / 100;
v = (v == Math.floor(v)) ? v + ".00" : ((v * 10 == Math.floor(v * 10)) ? v + "0" : v);
v = String(v);
var ps = v.split('.'),
whole = ps[0],
sub = ps[1] ? '.' + ps[1] : '.00',
r = /(\d+)(\d{3})/;
while (r.test(whole)) {
whole = whole.replace(r, '$1' + ',' + '$2');
}
return "₹ " + whole + sub;
};
</script>
@X.ResourceManager()
@(
Html.X().GridPanel()
.ID("GridPanel1")
.Store(
Html.X().Store()
.DataSource(ViewBag.loadgrid)
.Model
(
X.Model()
.ID("mid")
.Fields
(
X.ModelField().Name("text").Type(ModelFieldType.String),
X.ModelField().Name("value").Type(ModelFieldType.Float)
)
)
)
.ColumnModel(
Html.X().Column().DataIndex("text").Text("text").Flex(1).StyleSpec("text-align:right"),
Html.X().Column().DataIndex("value").Text("value").Flex(1).StyleSpec("text-align:right")
.Renderer("Ext.util.Format.indianMoney")
)
)
Example Controller
public class textalignController : Controller
{
//
// GET: /textalign/
public ActionResult Index()
{
ViewBag.loadgrid = getSampleData();
return View();
}
private List<textalign> getSampleData()
{
List<textalign> _textalign = new List<textalign>();
_textalign.Add(new textalign
{
text = "Sample text",
value = 10.36,
});
_textalign.Add(new textalign
{
text = "some more Sample text",
value = 25.38,
});
return _textalign;
}
}
public class textalign
{
public string text { get; set; }
public double value { get; set; }
}
the Indian rupee symbol displayed in Firefox ,but not in chrome(Version 37.0.2062.103 m) and IE 11.