Thanks for the quick response!
First, to answer you question : In the DevExpress grid designer (this is design time) , when you select "Columns" for a grid, two lists appear : The Field list and the Column list. The ContractValue_Sale is in the Field list, but not in the Column list. So, the fields in the Column list I selected from the Field list. But I only select Fields that I return in the query.
Now, here's how all the fields from ContractualUnit are available at design time in the Grid Designer:
1. After generating the ES code with MyGeneration, the ContractualUnitCollection is made available in the Form designer.
2. I drag a ContractualUnitCollection into the Form (in which the DevExpress grid is placed).
3. I drag a bindingsource into the same form.
4. Set the DataSource of the bindingsource to ContractualUnitCollection that I dragged into the form.
5. Set the DataSource of the grid to the bindingsource.
In addition to that, I want to be able to show some data from the joined tables. Here's how I made those available to the designer :
Code:
public partial class ContractualUnit : esContractualUnit
{
protected override List GetLocalBindingProperties()
{
List props = new List();
props.Add(new esPropertyDescriptor(this, "ClientName", typeof(String)));
props.Add(new esPropertyDescriptor(this, "ConcernName", typeof(String)));
props.Add(new esPropertyDescriptor(this, "ServiceTypeName", typeof(string)));
props.Add(new esPropertyDescriptor(this, "ServiceName", typeof(string)));
props.Add(new esPropertyDescriptor(this, "CommodityName", typeof(string)));
props.Add(new esPropertyDescriptor(this, "SubPortfolioClientName", typeof(string)));
props.Add(new esPropertyDescriptor(this, "CurrencyName", typeof(string)));
props.Add(new esPropertyDescriptor(this, "UnitName", typeof(string)));
props.Add(new esPropertyDescriptor(this, "SubServiceName", typeof(string)));
return props;
}
public String ClientName
{
get
{
return (string)GetColumn("ClientName");
}
}
}Please note that I have removed all the property getters except for ClientName.
thx
Tore Andre