c# - not able to find property in DataSource -
i trying tu bind accessdatasource gridview in asp.net. accessdatasource composed of 2 tables, let's say,
table data, table modifications my query select data accessdatasource following
select data.*, iif(isnull(modifications.comments), ' ', modifications.comments) comments, iif(isnull(modifications.disengagement), 0, modifications.disengagement) disengagement (data left outer join modifications on data.[project number] = modifications.[project number]) i use query builder visual studio verify output previous query , ok.
every field in table "data" fine , don't cause exceptions thrown. exemple, work fine because "amount" column "data" table.
<asp:boundfield datafield="amount" headertext="<%$resources:i18n, column_amount %>" sortexpression="amount" itemstyle-horizontalalign="center" itemstyle-width="1%" /> from point fine , move on, created boundfield in gridview containing data "modifications.[disengagement]", :
<asp:boundfield datafield="disengagement" headertext="<%$resources:i18n, column_disengagement %>" sortexpression="disengagement" itemstyle-horizontalalign="center" itemstyle-width="1%" /> but can't seem access column in "modifications" table , when launch webpage, error :
system.web.httpexception: unable find property 'disengagement' in selected data source. i have double checked names of columns , names of variables in code, continue so, triple check if must, think problem comes somewhere else.
do guys have ideas ?
i have found problem. launching query in code button click , query not getting data. have fixed problem , implement "singleton" solution manage query strings in code.
Comments
Post a Comment