Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetEmptyEntityList and GetEmptyDataSet error?
Message
From
18/04/2008 14:53:05
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
GetEmptyEntityList and GetEmptyDataSet error?
Miscellaneous
Thread ID:
01311761
Message ID:
01311761
Views:
59
I am trying to call GetEmptyEntityList() or GetEmptyDataSet() but I am getting this error:

"Child list for field Job_info cannot be created."


I am trying to populate a bound grid with an empty data set, so I can show the column headers to be populated with the default column names from the BO.


The main problem is that I cannot refer to the columns by name unless it has been loaded with data, but I do not want to show data yet.
I want to hide the "cust_num" column in the grid as the form is loading up, since this is redundant in the Jobs Grid.
    public partial class formJobCenter : mmBusinessForm
        
       {

        private Customer Customer;
        private Jobinfo Job;
        private Jobitem JobItems;


        // Constructor

        public formJobCenter()
        {
            // Instantiate and register business objects
            this.Customer = (Customer)this.RegisterPrimaryBizObj(new Customer());
            this.Job = (Jobinfo)this.RegisterBizObj(new Jobinfo());
            this.JobItems = (Jobitem)this.RegisterBizObj(new Jobitem());

            
            InitializeComponent();

             this.mmComboBox1.SelectedIndex = 0;

            this.Customer.GetCustWithActiveJobs();

            this.Job.GetEmptyDataSet();


            #region Customer grid formatting 
                this.mmGridCustomers.AutoGenerateColumns = true;
                this.mmGridCustomers.CellBorderStyle = DataGridViewCellBorderStyle.None;
	        this.mmGridCustomers.Columns[0].Width = 60;
                this.mmGridCustomers.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                this.mmGridCustomers.RowHeadersVisible = false;
            #endregion

            #region Jobs grid formating 
                this.mmGridJobs.AutoGenerateColumns = true;
                this.mmGridJobItems.Columns["cust_num"].Visible = false;
                this.mmGridJobs.Sort(this.mmGridJobs.Columns["job_start"], ListSortDirection.Descending);// Set initial sort
            #endregion 

            #region Job Items grid formatting 
                this.mmGridJobItems.AutoGenerateColumns = true;
            #endregion 

        }
Next
Reply
Map
View

Click here to load this message in the networking platform