Html Code:
<asp:DataGrid ID="myGrid">
<Columns>
<asp:BoundColumn DataField="CustomerName" HeaderText="Customer">
<ItemStyle Font-Bold="True" />
</asp:BoundColumn>
</Columns>
</asp:DataGrid>
Code Behind:
public string TestFunction(string str)
{
return str.replace("A","B");
}
how to call TestFunction ? DataField=”TestFunction(CustomerName)”
Best Regards…
You need to do this in a TemplateColumn:
This however means you will loose autosorting and editing – but who uses that anyway 🙂