c# - Binding a DataTable to a DataView -


hi have datatable called tblmanual populated data, i'm trying bind dataview called dataview1. trying this:

dataview1.datasource = tblmanual; dataview1.databind(); 

but when dataview1 displays on web page shows blank, not getting errors though, have confirmed there data in tblmanual.

the code dataview1 in asp

<dx:aspxdataview id="dataview1" runat="server" enabletheming="true" layout="flow" theme="moderno">         <pagersettings shownumericbuttons="false"></pagersettings>     </dx:aspxdataview> 

here tblmanual showing contains data enter image description here

add <dx:gridviewdatacolumn> , set fieldname parameters datasource's field names , here example .

   <dx:aspxdataview id="dataview1" runat="server" enabletheming="true" layout="flow" theme="moderno">             <columns>                 <dx:gridviewdatacolumn fieldname="name" />                 <dx:gridviewdatacolumn fieldname="region" />                 <dx:gridviewdatacolumn fieldname="type" />                 <dx:gridviewdatacolumn fieldname="price" />                        </columns>      <pagersettings shownumericbuttons="false"></pagersettings>         </dx:aspxdataview> 

Comments