3 Answers, 1 is accepted
0
Hello Blokhin
These code-snippets may be helpful:
Regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
These code-snippets may be helpful:
foreach (GridColumn column in RadGrid1.MasterTableView.RenderColumns) |
{ |
if (column.UniqueName == "myUniqueColumnName") |
{ |
string columnType = column.ColumnType; |
string dataType = column.DataTypeName; |
} |
} |
protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e) |
{ |
if (e.Column.UniqueName == "myUniqueColumnName") |
{ |
string columnType = e.Column.ColumnType; |
string dataType = e.Column.DataTypeName; |
} |
} |
string columnType = RadGrid1.MasterTableView.GetColumnSafe("myUniqueColumnName").ColumnType; |
string dataType = RadGrid1.MasterTableView.GetColumnSafe("myUniqueColumnName").DataTypeName; |
Regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
John
Top achievements
Rank 1
answered on 03 Dec 2015, 01:21 PM
Is it possible to format the data in the column cells?
0
Hello John,
Indeed, it is possible thanks to the DataFormatString property.
More information is available here:
Using columns
Regards,
Daniel
Telerik
Indeed, it is possible thanks to the DataFormatString property.
<
telerik:GridBoundColumn
DataField
=
"Value"
HeaderText
=
"Value"
UniqueName
=
"Value"
SortExpression
=
"Value"
DataType
=
"System.Double"
DataFormatString
=
"{0:G17}"
>
</
telerik:GridBoundColumn
>
More information is available here:
Using columns
Regards,
Daniel
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items