I have an in-memory DataSet bound to an ASPxGridView where the column names are determined by a variable. Now I would prefer to assign the FieldName of the columns in the markup with the value of the corresponding variable, but <%#Eval(...)%>
throws the following error.
Parser Error Message: Databinding expressions are only supported on objects that have a DataBinding event. DevExpress.Web.ASPxGridView.GridViewDataTextColumn does not have a DataBinding event.
Is it possible to assign the FieldName-Attribute of a GridViewDataTextColumn with a variable in the markup?
From
<dx:GridViewDataTextColumn Caption="Product" FieldName="product_name">
To
<dx:GridViewDataTextColumn Caption="Product" FieldName="<%# Eval("ProductFieldName") %>">