c# - Unable to populate GridViewDataTextColumn using EF DB model -
this first time working code first approach entity framework models. i'm trying populate data grid user info grid column isn't displaying info.
<dx:aspxgridview id="customer_grid" runat="server" autogeneratecolumns="false" width="170px" > <columns> <dx:gridviewdatatextcolumn name="customername" visibleindex="0"> </dx:gridviewdatatextcolumn> </columns> </dx:aspxgridview>
here's code behind
protected void page_load(object sender, eventargs e) { if (!ispostback) { ecdevelopmententities db = new ecdevelopmententities(); customer_grid.datasource = db.customers.tolist(); customer_grid.databind(); } }
Comments
Post a Comment