Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 是否可以在BoundColumn.DataField内调用函数?_Asp.net_Datagrid_Boundcolumn_Datafield - Fatal编程技术网

Asp.net 是否可以在BoundColumn.DataField内调用函数?

Asp.net 是否可以在BoundColumn.DataField内调用函数?,asp.net,datagrid,boundcolumn,datafield,Asp.net,Datagrid,Boundcolumn,Datafield,有人知道我如何重写那个东西吗???使用一个并在事件中进行后期处理这里是您希望用于模板列的完整片段 A field or property with the name 'postProcess(pos)' was not found on the selected data source. <asp:BoundColumn DataField="postProccess(pos)" HeaderText="Principal Office" /> A field or prop

有人知道我如何重写那个东西吗???

使用一个并在事件中进行后期处理

这里是您希望用于模板列的完整片段

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

<asp:BoundColumn DataField="postProccess(pos)" HeaderText="Principal Office" />
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>