Possible to call a function inside BoundColumn.DataField?
-
03-07-2019 - |
Question
<asp:BoundColumn DataField="pos" HeaderText="Principal Office" />
would it be possible to somehow...
<asp:BoundColumn DataField="postProccess(pos)" HeaderText="Principal Office" />
...so I could modify the value as needed?
CRAP:
A field or property with the name 'postProcess(pos)' was not found on the selected data source.
Anyone know how I can override that thing or something??
Solution
Here is the full snippet you'd want to use for your template column...
<asp:TemplateColumn HeaderText="Principal Office">
<ItemTemplate>
<%# postProcess(Eval("pos")) %>
<ItemTemplate>
<asp:TemplateColumn>
OTHER TIPS
use an <asp:templatecolumn>
and do the post processing in the ItemDataBound
event
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow