<asp:BoundColumn DataField="pos" HeaderText="Principal Office" />

有可能以某种方式......

<asp:BoundColumn DataField="postProccess(pos)" HeaderText="Principal Office" />

...所以我可以根据需要修改值吗?

CRAP:

A field or property with the name 'postProcess(pos)' was not found on the selected data source.

任何人都知道如何覆盖那件事或什么?

有帮助吗?

解决方案

以下是您要用于模板列的完整代码段...

<asp:TemplateColumn HeaderText="Principal Office">
   <ItemTemplate>
      <%# postProcess(Eval("pos")) %>
   <ItemTemplate>
<asp:TemplateColumn>

其他提示

使用 <asp:templatecolumn> 并在中进行后期处理a href =“http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datagrid.itemdatabound.aspx”rel =“nofollow noreferrer”> ItemDataBound 事件

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top