I want to call a method on databound field on datafield. e.g.
<asp:BoundField DataField="TitlePLang" HeaderText="Batch Title" /> This is simple bound field but I want to do something like this.
<asp:BoundField DataField='<%# Eval(getCultureSpecificTitle("TitlePLang","TitleSLang",true))%>' HeaderText="Batch Title" />
Where getCultureSpecificTitle is a method in code behind, but its giving error that bound field doesn’t allow data binding.
So please help how can I do this….
Well this is not possible using the bind files but you can make use of the
TempalteFieldavaialbe in the grid view will allows you to do this easily.If you want to achieve same from the code behind than you make use of
OnRowDataBoundevent available for the datagrid view will do the work for you.