I am converting (from E9 to E10) this code and not getting any error but I am not getting any data return. But I am guessing it is something to do with GetDashboardQuery. However, I am not sure what is the replacement for E10. What is the new information to replace the code?


	gridContacts.DataSource =new DataTable();
	string BAQ = session.CompanyID + "-ARInvoice_Mailer_Head";
	**DynamicQueryAdapter queryAdapter = new DynamicQueryAdapter(oTrans);**

** queryAdapter.BOConnect();**
** queryAdapter.GetDashboardQuery(BAQ);**
** DataView dv = new DataView(queryAdapter.RuntimeQuery.Tables[“QueryTable”]);**
string filter ="";

	if (txtCustID.Text.Trim().Length > 0)
		filter = AddFilter("", "Customer.CustID=", txtCustID.Text.Trim(), true); 
    	dv.RowFilter = "DataTableName='Customer'";
    	dv[0]["WhereClause"] = filter; 

          DataTable dt = queryAdapter.QueryResults.Tables["Results"];

	gridHeader.DataSource = dt;

Change this:

To this:

DataView dv = new DataView(queryAdapter.QueryResults.Tables[“Results”]);
1 Like

Thanks, I will give this a try and see if that works

This did not work. Still not getting any results. It seems to be stuck at the “Retrieving data…”.


It seems that this part of the code work for E9, but E10 threw and error at runtime saying Column name “DataTableName” cannot be found.

What would the replacement for E10?

Are you filtering the dataview based on the textbox value?

Then the syntax would be:

if (txtCustID.Text.Trim().Length > 0)
   dv.RowFilter = String.Format("Customer_CustID = '{0}'", txtCustID.Text.Trim());

Thank you @Carson that suggested change worked.

If I have a list of values in a datatable grid and a column name “Selected” and want to assign all the selected ones to a list, how would you go about doing that?

In E9 it was done this way:
DataRow[] invoiceList = ((DataTable)gridHeader.DataSource).Select(“Selected=true”);

But this is throwing error that “Cannot find column [Selected]”.

You need to figure out what the name of the column is, “Selected” can be the caption, but its the ID you need. Have a look at the Columns.