This question is locked. New answers and comments are not allowed.
Hello everyone.
I have a scenario where I need to show a query using pivot table (show values by year quarter, so I don't know how many columns the grid will have). I have bound a telerik mvc grid to a datatable.
More than that...I need to make some of those columns editable (the editable ones must be every column but the first 3)
To every System.Data.Datarow, I have a cell with an unique ID.
So, I made a template using telerik mvc currency textBox this way:
My plan is to manual (jquery) search the CurrencyTextBoxes for changes after the Client hit a Save Button.
My issue is: The CurrencyTextBox in the grid show's no value at first glance, unless you have focus on the field, then the values are displayed.
Any ideas what is causing this behavior?
I have a scenario where I need to show a query using pivot table (show values by year quarter, so I don't know how many columns the grid will have). I have bound a telerik mvc grid to a datatable.
More than that...I need to make some of those columns editable (the editable ones must be every column but the first 3)
To every System.Data.Datarow, I have a cell with an unique ID.
So, I made a template using telerik mvc currency textBox this way:
@model System.Data.DataTable<div id="placeHolderDadosFinanceiros"> @( Html.Telerik().Grid(Model) .Name("GridDadosFinanceiros") .Columns(columns => { int columnIndex = 0; foreach (System.Data.DataColumn column in Model.Columns) { if (columnIndex < 4) { columns.Bound(column.DataType, column.ColumnName) .Width(80); } else { string[] nome = Model.Columns[columnIndex].ColumnName.Split('_'); columns .Bound(column.DataType, column.ColumnName) .Template(@<text>@Html.Telerik() .CurrencyTextBox() .Value(0) .Name("txtValue" + column.ColumnName + "<#= " + Model.Columns[1].ColumnName + " #>") .DecimalDigits(4) .IncrementStep((decimal)0.005) .ToHtmlString()</text>) .Title(string.Concat(nome[0].Replace("T", string.Empty), "º Trimestre (", nome[1], ")")) .ClientTemplate(Html.Telerik() .CurrencyTextBox() .Value(0) .Name("txtValue" + column.ColumnName + "<#= " + Model.Columns[1].ColumnName + " #>") .DecimalDigits(4) .IncrementStep((decimal)0.005) .ToHtmlString()); } columnIndex++; } }) .DataBinding(dataBinding => dataBinding.Ajax() .Select("GridDadosFinanceirosSelect", "Simulador")) .Pageable(p => p.PageSize(15)) .Sortable() .Filterable())</div>My plan is to manual (jquery) search the CurrencyTextBoxes for changes after the Client hit a Save Button.
My issue is: The CurrencyTextBox in the grid show's no value at first glance, unless you have focus on the field, then the values are displayed.
Any ideas what is causing this behavior?