M
Michelle Stone
Hi
I use the following code to add a column to a datagrid
programatically
col = new BoundColumn ();
col.HeaderText = "Agency";
col.DataField = "gridGetIsAgency (DataBinder.Eval
Container, 'DataItem.Agency').ToString ())";
approvalGrid.Columns.Add (col);
"gridGetIsAgency" is a function that evaluations the
value of the AGENCY field and returns a value
appropriately
public string gridGetIsAgency (string sValue)
{
return "return something for now";
}
I get the following error:
====
A field or property with the name 'gridGetIsAgency
(DataBinder.Eval (Container, 'DataItem.Agency').ToString
())' was not found on the selected datasource
====
Now, I have confirmed that the field AGENCY exists. What
else could be the problem? Thanks
I use the following code to add a column to a datagrid
programatically
col = new BoundColumn ();
col.HeaderText = "Agency";
col.DataField = "gridGetIsAgency (DataBinder.Eval
Container, 'DataItem.Agency').ToString ())";
approvalGrid.Columns.Add (col);
"gridGetIsAgency" is a function that evaluations the
value of the AGENCY field and returns a value
appropriately
public string gridGetIsAgency (string sValue)
{
return "return something for now";
}
I get the following error:
====
A field or property with the name 'gridGetIsAgency
(DataBinder.Eval (Container, 'DataItem.Agency').ToString
())' was not found on the selected datasource
====
Now, I have confirmed that the field AGENCY exists. What
else could be the problem? Thanks