GridView columns HeaderText from a function
-
The following variations (and more) fail to display correctly. Want to have the HeaderText property in the aspx page obtain a value from the code behind page. Any ideas?
asp:BoundField DataField="Cargo" HeaderText='<% BL.Translate("Cargos") %>' SortExpression="Cargo"
asp:BoundField DataField="Cargo" HeaderText='<% =BL.Translate("Cargos") %>' SortExpression="Cargo"
asp:BoundField DataField="Cargo" HeaderText=<% BL.Translate("Cargos") %> SortExpression="Cargo"Thanks, Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious. Vince Lombardi (1913-1970)
-
The following variations (and more) fail to display correctly. Want to have the HeaderText property in the aspx page obtain a value from the code behind page. Any ideas?
asp:BoundField DataField="Cargo" HeaderText='<% BL.Translate("Cargos") %>' SortExpression="Cargo"
asp:BoundField DataField="Cargo" HeaderText='<% =BL.Translate("Cargos") %>' SortExpression="Cargo"
asp:BoundField DataField="Cargo" HeaderText=<% BL.Translate("Cargos") %> SortExpression="Cargo"Thanks, Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious. Vince Lombardi (1913-1970)
You cannot use Inline Coding in Server Controls. Use RowDataBound or DataBound Event of the GridView Control to set its HeaderText.
Regards, Venkatesh Mookkan. Software Engineer, India My: Website | Yahoo Group | Blog Spot