Hi, i am trying to dynamically control which column in the datagrid is visible
and which is invisible using a configuration table storing the value of true or
false. When i load the datagrid, i set the visibility of each data column to
the value in the configuration table for each particular column but it gives me
parser error. What's wrong with the code? Can someone help me pls? below is the
code attached.
I have checked the value returned by <%# dsConfig.FieldValue("s_vendorName",
Container) %> is either true or false.
<asp

ataGrid
AllowPaging="false"
AllowSorting="true"
AutoGenerateColumns="false" BorderColor="#000000" BorderWidth="1"
CellPadding="3"
CellSpacing="0"
DataSource="<%# dsVendor.DefaultView %>" id="dgVendor"
runat="server"
ShowFooter="false"
ShowHeader="true" Width="100%" OnSortCommand="sort_grid"
<asp:TemplateColumn HeaderText="Vendor" SortExpression="vName"
Visible= "<%# dsConfig.FieldValue("s_vendorName", Container) %>"
runat="server">