When you have a checkbox template in a datagrid how do I bind the value I want showing up?
Below is how I do it with a datatable as the datasource. I am setting datasource = dealerscollection.
What do I put in place of "active" below to make this work?
<asp:checkbox id=active runat="server" Enabled="true" text="Activate" checked='<%#container.DataItem("active")%>'>
The error I am getting is:
No default member found for type 'DealerEntity'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.MissingMemberException: No default member found for type 'DealerEntity'.
Source Error:
Line 111: <asp:TemplateColumn SortExpression="active" HeaderText="Active">
Line 112: <ItemTemplate>
Line 113: <asp:checkbox id=active runat="server" Enabled="true" text="Activate" checked='<%#container.DataItem("active")%>'>
Line 114: </asp:checkbox>
Line 115: </ItemTemplate>