Hello,
i want to Bind EntityCollections (LLBL-Engine) to the WebHierarchicalDataGrid.
When I start the ASP.NET site. The Job will be shown. When i click on the Job, to watch its protocolls, this error is being displayed:
Runtime Exception: No child grid script descriptors are available!
Job entity got an EntityCollcetion<AppJobProtokollEntity>. That has to be the childband. Both got a JobId.
Can someone help me?
Kind regards,
David Müller
Here is my Code:
IJobManager _jobManager = ServiceContainer.Current.GetService<IJobManager
>();
AppJobEntity job = _jobManager.GetJob(ticket, Guid.Parse("E57E0B1A-9C31-4987-8800-D5E8EC4B609F"), true);
List<AppJobEntity> list = new List<AppJobEntity>();list.Add(job);List<AppJobProtokollEntity> listProtokoll = new List<AppJobProtokollEntity>();
listProtokoll = job.AppJobProtokolls.ToList<
AppJobProtokollEntity>();
Infragistics.Web.UI.DataSourceControls.
DataView dv1 = new Infragistics.Web.UI.DataSourceControls.DataView();
dv1.ID =
"PARENT";
dv1.DataSource = list;
DataView dv2 = new Infragistics.Web.UI.DataSourceControls.DataView();
dv2.ID =
"CHILD";
dv2.DataSource = listProtokoll;
WebHierarchicalDataSource hdsMain = new WebHierarchicalDataSource();
hdsMain.DataViews.Add(dv1);
hdsMain.DataViews.Add(dv2);
DataRelation drMain = new Infragistics.Web.UI.DataSourceControls.DataRelation();
drMain.ParentColumns =
new string[] { "JobId"};
drMain.ChildColumns =
new string[] { "JobId" };
drMain.ParentDataViewID =
drMain.ChildDataViewID =
hdsMain.DataRelations.Add(drMain);
Band parentBand = new Band();
WebHierarchicalDataGrid1.Bands.Add(parentBand);
parentBand.DataMember =
parentBand.DataKeyFields =
"JobId";
AddBandColumn(parentBand,
"JobId", "JobId", true);
AddBandColumn(parentBand, "
MandantGuid", "MandantGuid", false);
"JobStart", "JobStart", false);
"JobEnd", "JobEnd", false);
"Status", "Status", false);
AddBandColumn(parentBand,"
Progress", "Progress", false);
"ErrorMail", "ErrorMail", false);
BenutzerId", "Benutzer", false);
Description", "Beschreibung", false);
Band childBand = new Band();
WebHierarchicalDataGrid1.Bands.Add(childBand);
childBand.DataMember =
childBand.DataKeyFields =
AddBandColumn(childBand,
"JobProtokollId", "ProtokollId", false);
"Time", "Time", false);
AddBandColumn(childBand, "
Level", "Level", false);
"Text", "Text", false);
FormatBandColumn(childBand,
FormatBandColumn(childBand, "
this.WebHierarchicalDataGrid1.DataSource = hdsMain;
this.WebHierarchicalDataGrid1.DataBind();
Hello David,please read the following forum post: https://es.infragistics.com/community/forums/f/ultimate-ui-for-asp-net/35449/webhierarchicaldatagrid-linq-object-binding Alexander Kartavov explains why you are getting this error.
Hope this helps