Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
325
No child grid script descriptors are available????
posted

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;

 

Infragistics.Web.UI.DataSourceControls.

 

 

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);

Infragistics.Web.UI.DataSourceControls.

 

 

DataRelation drMain = new Infragistics.Web.UI.DataSourceControls.DataRelation();

drMain.ParentColumns =

 

new string[] { "JobId"};

drMain.ChildColumns =

 

 

new string[] { "JobId" };

drMain.ParentDataViewID =

 

"PARENT";

drMain.ChildDataViewID =

 

"CHILD";

hdsMain.DataRelations.Add(drMain);

 

 

 

Band parentBand = new Band();

WebHierarchicalDataGrid1.Bands.Add(parentBand);

parentBand.DataMember =

 

"PARENT";

parentBand.DataKeyFields =

 

"JobId";

AddBandColumn(parentBand,

 

"JobId", "JobId", true);

AddBandColumn(parentBand, "

 

MandantGuid", "MandantGuid", false);

AddBandColumn(parentBand,

 

"JobStart", "JobStart", false);

AddBandColumn(parentBand,

 

"JobEnd", "JobEnd", false);

AddBandColumn(parentBand,

 

"Status", "Status", false);

AddBandColumn(parentBand,"

 

Progress", "Progress", false);

AddBandColumn(parentBand,

 

"ErrorMail", "ErrorMail", false);

AddBandColumn(parentBand, "

 

BenutzerId", "Benutzer", false);

AddBandColumn(parentBand, "

 

Description", "Beschreibung", false);

 

 

 

Band childBand = new Band();

WebHierarchicalDataGrid1.Bands.Add(childBand);

childBand.DataMember =

 

"CHILD";

childBand.DataKeyFields =

 

"JobId";

AddBandColumn(childBand,

 

"JobId", "JobId", true);

AddBandColumn(childBand,

 

"JobProtokollId", "ProtokollId", false);

AddBandColumn(childBand,

 

"Time", "Time", false);

AddBandColumn(childBand, "

 

Level", "Level", false);

AddBandColumn(childBand,

 

"Text", "Text", false);

FormatBandColumn(childBand,

 

"JobId", "JobId", true);

FormatBandColumn(childBand,

 

"JobProtokollId", "ProtokollId", false);

FormatBandColumn(childBand,

 

"Time", "Time", false);

FormatBandColumn(childBand, "

 

Level", "Level", false);

FormatBandColumn(childBand,

 

"Text", "Text", false);

 

 

 

 

this.WebHierarchicalDataGrid1.DataSource = hdsMain;

 

 

 

this.WebHierarchicalDataGrid1.DataBind();