DynamicQueryAdapter

Thanks so much for the input. Its still not working. When I debug in visual studio I visually see that the edvChildren DataView has the new row. In order to get there I end up having to do the following,

partAdapter.DuplicatePart(part,newPart,"Desc");

DynamicQueryAdapter baqAdapter = new DynamicQueryAdapter(oTrans);
baqAdapter.BOConnect();

baqAdapter.ExecuteByID("EPIC03-PartsMatrixChild");

edvChildren.dataView = new DataView(baqAdapter.QueryResults.Tables["Results"]);
baqAdapter.Dispose();

Once this process is complete it is not reflected in the actual grid. I tried to use the suggestion you provided with no luck.

--- In vantage@yahoogroups.com, "zanniebelle" <rwatson@...> wrote:
>
> Correction:
> That should be "edvChildren" not BAQPartChildren:
> edvChildren.Notify(new EpiNotifyArgs(oTrans,edvChildren.Row,edvChildren.Column));
>
>
> --- In vantage@yahoogroups.com, "zanniebelle" <rwatson@> wrote:
> >
> > Try the following in the event handler when a part is added or deleted:
> > BAQPartChildren.Notify(new EpiNotifyArgs(oTrans,BAQPartChildren.Row,BAQPartChildren.Column));
> >
> >
> > --- In vantage@yahoogroups.com, "levinson.adam" <levinson.adam@> wrote:
> > >
> > > I have a small/strange issue. I am trying to bind a grid to an editable BAQ. I can load the BAQ as the form loads. I am able to bind the EpiUltraGrid to it. The issue comes when I add a new record.
> > >
> > > I am workin on a Part setup customization in which any related parts are displayed in a grid within a sheet. When the Part customization loads the BAQ is loaded via the code below,
> > > private static void LoadPartMatrixView() {
> > >
> > > DynamicQueryAdapter baqAdapter = new DynamicQueryAdapter(oTrans);
> > > baqAdapter.BOConnect();
> > >
> > > baqAdapter.ExecuteByID("EPIC03-PartsMatrixChild");
> > >
> > > edvChildren = new EpiDataView();
> > >
> > > edvChildren.dataView = new DataView(baqAdapter.QueryResults.Tables["Results"]);
> > >
> > > //make columns read only?
> > > //loop columns
> > > int i = 1;
> > > foreach(DataColumn dc in edvChildren.dataView.Table.Columns) {
> > > if(i < 4)
> > > {
> > > dc.ExtendedProperties["ReadOnly"] = true;
> > > }
> > > dc.ExtendedProperties["Like"] = dc.ColumnName.ToString();
> > > i++;
> > > }
> > >
> > > //Add adpater to tables
> > > if((oTrans.EpiDataViews.ContainsKey("BAQPartChildren") == false)) {
> > > oTrans.Add("BAQPartChildren", edvChildren);
> > > }
> > > baqAdapter.Dispose();
> > > }
> > >
> > > Then as the part number changes the dataview I created in memory is filtered. The issue I am having is when a new related part is added or a related part is deleted I cant seem to get the grid to refresh. The DataView will refresh and I can see in the row counts that it picks up the new record but no matter what I try the grid does not display the new record.
> > >
> > > Any ideas?
> > >
> >
>
I have a small/strange issue. I am trying to bind a grid to an editable BAQ. I can load the BAQ as the form loads. I am able to bind the EpiUltraGrid to it. The issue comes when I add a new record.

I am workin on a Part setup customization in which any related parts are displayed in a grid within a sheet. When the Part customization loads the BAQ is loaded via the code below,
private static void LoadPartMatrixView() {

DynamicQueryAdapter baqAdapter = new DynamicQueryAdapter(oTrans);
baqAdapter.BOConnect();

baqAdapter.ExecuteByID("EPIC03-PartsMatrixChild");

edvChildren = new EpiDataView();

edvChildren.dataView = new DataView(baqAdapter.QueryResults.Tables["Results"]);

//make columns read only?
//loop columns
int i = 1;
foreach(DataColumn dc in edvChildren.dataView.Table.Columns) {
if(i < 4)
{
dc.ExtendedProperties["ReadOnly"] = true;
}
dc.ExtendedProperties["Like"] = dc.ColumnName.ToString();
i++;
}

//Add adpater to tables
if((oTrans.EpiDataViews.ContainsKey("BAQPartChildren") == false)) {
oTrans.Add("BAQPartChildren", edvChildren);
}
baqAdapter.Dispose();
}

Then as the part number changes the dataview I created in memory is filtered. The issue I am having is when a new related part is added or a related part is deleted I cant seem to get the grid to refresh. The DataView will refresh and I can see in the row counts that it picks up the new record but no matter what I try the grid does not display the new record.

Any ideas?
Try the following in the event handler when a part is added or deleted:
BAQPartChildren.Notify(new EpiNotifyArgs(oTrans,BAQPartChildren.Row,BAQPartChildren.Column));


--- In vantage@yahoogroups.com, "levinson.adam" <levinson.adam@...> wrote:
>
> I have a small/strange issue. I am trying to bind a grid to an editable BAQ. I can load the BAQ as the form loads. I am able to bind the EpiUltraGrid to it. The issue comes when I add a new record.
>
> I am workin on a Part setup customization in which any related parts are displayed in a grid within a sheet. When the Part customization loads the BAQ is loaded via the code below,
> private static void LoadPartMatrixView() {
>
> DynamicQueryAdapter baqAdapter = new DynamicQueryAdapter(oTrans);
> baqAdapter.BOConnect();
>
> baqAdapter.ExecuteByID("EPIC03-PartsMatrixChild");
>
> edvChildren = new EpiDataView();
>
> edvChildren.dataView = new DataView(baqAdapter.QueryResults.Tables["Results"]);
>
> //make columns read only?
> //loop columns
> int i = 1;
> foreach(DataColumn dc in edvChildren.dataView.Table.Columns) {
> if(i < 4)
> {
> dc.ExtendedProperties["ReadOnly"] = true;
> }
> dc.ExtendedProperties["Like"] = dc.ColumnName.ToString();
> i++;
> }
>
> //Add adpater to tables
> if((oTrans.EpiDataViews.ContainsKey("BAQPartChildren") == false)) {
> oTrans.Add("BAQPartChildren", edvChildren);
> }
> baqAdapter.Dispose();
> }
>
> Then as the part number changes the dataview I created in memory is filtered. The issue I am having is when a new related part is added or a related part is deleted I cant seem to get the grid to refresh. The DataView will refresh and I can see in the row counts that it picks up the new record but no matter what I try the grid does not display the new record.
>
> Any ideas?
>
Correction:
That should be "edvChildren" not BAQPartChildren:
edvChildren.Notify(new EpiNotifyArgs(oTrans,edvChildren.Row,edvChildren.Column));


--- In vantage@yahoogroups.com, "zanniebelle" <rwatson@...> wrote:
>
> Try the following in the event handler when a part is added or deleted:
> BAQPartChildren.Notify(new EpiNotifyArgs(oTrans,BAQPartChildren.Row,BAQPartChildren.Column));
>
>
> --- In vantage@yahoogroups.com, "levinson.adam" <levinson.adam@> wrote:
> >
> > I have a small/strange issue. I am trying to bind a grid to an editable BAQ. I can load the BAQ as the form loads. I am able to bind the EpiUltraGrid to it. The issue comes when I add a new record.
> >
> > I am workin on a Part setup customization in which any related parts are displayed in a grid within a sheet. When the Part customization loads the BAQ is loaded via the code below,
> > private static void LoadPartMatrixView() {
> >
> > DynamicQueryAdapter baqAdapter = new DynamicQueryAdapter(oTrans);
> > baqAdapter.BOConnect();
> >
> > baqAdapter.ExecuteByID("EPIC03-PartsMatrixChild");
> >
> > edvChildren = new EpiDataView();
> >
> > edvChildren.dataView = new DataView(baqAdapter.QueryResults.Tables["Results"]);
> >
> > //make columns read only?
> > //loop columns
> > int i = 1;
> > foreach(DataColumn dc in edvChildren.dataView.Table.Columns) {
> > if(i < 4)
> > {
> > dc.ExtendedProperties["ReadOnly"] = true;
> > }
> > dc.ExtendedProperties["Like"] = dc.ColumnName.ToString();
> > i++;
> > }
> >
> > //Add adpater to tables
> > if((oTrans.EpiDataViews.ContainsKey("BAQPartChildren") == false)) {
> > oTrans.Add("BAQPartChildren", edvChildren);
> > }
> > baqAdapter.Dispose();
> > }
> >
> > Then as the part number changes the dataview I created in memory is filtered. The issue I am having is when a new related part is added or a related part is deleted I cant seem to get the grid to refresh. The DataView will refresh and I can see in the row counts that it picks up the new record but no matter what I try the grid does not display the new record.
> >
> > Any ideas?
> >
>