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

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -