- Home
- LLBLGen Pro
- LLBLGen Pro Runtime Framework
why can't I remove a row from VS2005 winforms grid readWrite entity collection?
Joined: 29-Jun-2005
almost,
I have a:
1) datagridView named "datagridView1"
2) datagridViewBindingSource named "datagridView1BindingSource"
3) bindingSource for "datagridView1BindingSource" named "2ndBindingSource"
4) dataMember for "datagridView1BindingSource" named "datagridView1BindingSourceDataMember"
5) datasource for 2ndBindingSource named parentEntityCollection
Why? you ask..Because there are other comboboxes on the winform that the datagridView needs to stay in-sync with.
Well, If I bind "datagridView1" DIRECTLY to "2ndBindingSource" / "parentEntityCollection" then it doesn't contain the values that I need.
I have tried to explain with code / high level. If you can think of any way that I can cut out any of the above, then I'd be really grateful.
As I said before, as soon as I add the dataMember, then I can't delete rows from the datagridView. YET, I am able to edit and persist values in datagridView.
At NO point in my form's Designer.cs does it contain the value "allowRemove = false"
I'm trying as hard as I can to explain as clearly as possible, but i don't think that I can say much more :-(
please let me know if i can clarify anything.
many thanks,
yogi
Joined: 29-Jun-2005
hi Frans,
I think you must have posted just before i did ;-) If the post that I made does not change your advice, do you know how I would..
<<binding to the event in the master grid or something, where the active row is changed, so at that spot the parent entity is known and you can set the child collection's AllowRemove to true>>
many thanks,
yogi
Ok, I get the same behavior as you with the following setup: (and this behavior is logical, so it's not a bug, the only problem to solve here is how to set the AllowRemove property on the RIGHT collection)
Two bindingsources: _bsMain and _bsGrid. _bsGrid is bound to the gridview. _bsGrid.DataSource is set to _bsMain. _bsMain.DataSource is set to customersCollection1, which is an instance of northwind CustomerCollection
_bsGrid.DataMember is set to "Orders". This means that the OrdersCollection of the ACTIVE Customer is shown.
This indeed is the case: I use this code to fetch the data:
PrefetchPath path = new PrefetchPath((int)EntityType.CustomersEntity);
path.Add(CustomersEntity.PrefetchPathOrders);
customersCollection1.GetMulti((CustomersFields.Country == "Germany"), path);
Which gives me in the grid the orders for the customer ALFKI.
The quest now is: how to grasp the current Customer from the currencymanager so the proper collection can be referenced.
Now, the second bindingsource is needed because there's otherwise not a current parent row. If I bind _bsMain directly to the grid and set the member to "Orders", I don't see any data. Still it's silly, as when I set the position on the currencymanager for _bsMain, it DOES set the position, but there's still no data shown.
Ok, back to the 2-level bindingsource setup.
What you should do is simply this: ((OrdersCollection)_bsGrid.List).AllowRemove = true;
so what I do here is: I cast the List property of the datasource bound to the grid to the collection type shown in the grid (!). Then I set the AllowRemove property to true. Done.
You should do this when the position changes in the parent collection. I have no idea when that happens in your application but that's what you should do. THis is pure winforms databinding programming. I hope you get it up and running now
Joined: 29-Jun-2005
hiya Frans.
Ok, you'll have to bear with me because I initially used the actual names that were in my app, then I used high-level names, now I have to use different names again for your example. Please forgive me if i am getting a bit confused.
I'll paraphrase what you said, to se if I'm getting it right :-)
only problem to solve here is how to set the AllowRemove property on the RIGHT collection)
Two bindingsources: 1) _bsMain 2) _bsGrid.
datagridView1.dataSOURCE= _bsGrid
_bsGrid.dataSOURCE = _bsMain. _bsGrid.dataMEMBER= _"Orders" This means that the OrdersCollection of the ACTIVE Customer is shown.
_bsMain.DataSource = to customersCollection1, which is an instance of northwind CustomerCollection
I think, so far so good?
This indeed is the case: I use this code to fetch the data: Code: PrefetchPath path = new PrefetchPath((int)EntityType.CustomersEntity); path.Add(CustomersEntity.PrefetchPathOrders);
customersCollection1.GetMulti((CustomersFields.Country == "Germany"), path);
Which gives me in the grid the orders for the customer ALFKI.
OK, at the moment, I have never used prefetchPaths, the code I was using to filter my grid is as follows:
IPredicateExpression filter = new PredicateExpression();
filter.Add(PredicateFactory.CompareValue(TblDeliveryFieldIndex.DeliveryId, ComparisonOperator.Equal, _selectedDeliveryId));
currDeliveriesX.Clear();
currDeliveriesX.GetMulti(filter);
1 So, that is the first issue that I am stuck at.Obviously I need to have the correct data in the grid before I can fix the rest :-(
The quest now is: how to grasp the current Customer from the currencymanager so the proper collection can be referenced.
Ok, back to the 2-level bindingsource setup.
What you should do is simply this: ((OrdersCollection)_bsGrid.List).AllowRemove = true;
so what I do here is: I cast the List property of the datasource bound to the grid to the collection type shown in the grid (!). Then I set the AllowRemove property to true. Done.
You should do this when the position changes in the parent collection.
I try what you sugest but I get an error:
2
<<Unable to cast object of type 'System.ComponentModel.BindingList`1[dalExpressZaxSnax.EntityClasses.TblDeliveryProductsEntity]' to type 'dalExpressZaxSnax.CollectionClasses.TblDeliveryProductsCollection'.>>
The thing is, I can't be sure that this indeed a real error until I successfully bind my grid to the pre-fetched data.
Any suggestions on how to correct #1 are much appreciated.
cheers,
yogi
Ok, as this thread is getting fairly long and the information about your entity layout and grid/datasource layout is fragmented around, could you please describe briefly: 1) the entities involved and their relations with eachother? (e.g. Customer, Order, related by: Customer.CustomerID 1:n Order.CustomerID. Fields mapped onto that relation (both sides): Customer.Orders, and Order.Customer)
2) you already did this earlier, but for completeness: the grid + bindingsources structure, which bindingsource is bound to the grid, which is used as datasource in which other bindingsource and what the datamember settings are for each bindingsource.
As far as I understood your previous post with the names of the bindingsources + entities, I've recreated the same structure with northwind, customer + orders. So my previous post solves your problem, but it perhaps is not that understandable because your code looks different, so if you can describe the things I mentioned above, we can rewrite the code I posted so it reflects your situation
The prefetch path is used to fetch the related data in 1 go. You don't have to and leave it to lazy loading to fetch the data on the fly when it's needed, so that's just a way to fetch teh related data, and you use lazy loading, which is ok, it will result in the same data being present in the collection bound to the grid.
This is a winforms databinding related issue, not an llblgen pro issue, but to get you going, just provide the info I requested so we can help you and and you can move on
Joined: 29-Jun-2005
hiya Frans,
Thanks for staying with me :-) I've tried to answer your questions as fully as possible.Please let me know asap if I should clarify anything.
1) the entities involved and their relations with eachother.
delivery entity product entity driver entity run entity
I think delivery and product are the most important. relations: delivery, product related by delivery.barcode 1: n product.barcode.
<schema>
tblDelivery
deliveryId PK
deliveryDate
runId FK
driverId FK
tblProduct barCode PK productName price
tblDeliveryProducts (this is the mapping table) deliveryId PK barCode FK </schema>
Now, there are comboboxes on the winform eg cboDriver, that represent the particular driver for that delivery.The grid has to be kep in-sync with the current values of these comboboxes.
2) dgvDeliveryProducts.dataSOURCE = tblAddedReturnsBindingSource tblAddedReturnsBindingSource.dataMEMBER = TblDeliveryProducts tblAddedReturnsBindingSource.dataSOURCE = BindingSourceTblDelivery BindingSourceTblDelivery.dataSOURCE = currDeliveriesX
CurrDeliveriesX is an instance of tblDeliveryCollection, which I have dropped onto my form.
This is how my comboboxes are bound:
cboDrivers.DataBindings.Clear();
cboDrivers.DataBindings.Add(new Binding("SelectedValue", this.BindingSourceTblDelivery, dalExpressZaxSnax.TblDriverFieldIndex.DriverId.ToString(), true));
This is how I add items to my gridView.
private void DisplayDeliveryProducts()
{
IPredicateExpression filter = new PredicateExpression();
filter.Add(PredicateFactory.CompareValue(TblDeliveryFieldIndex.DeliveryId, ComparisonOperator.Equal, _selectedDeliveryId));
currDeliveriesX.Clear();
currDeliveriesX.GetMulti(filter);
currDeliveriesX.AllowRemove = true;
currDeliveriesX.AllowEdit = true;
currDeliveriesX.SupportsSorting = true;
dgvDeliveryProducts.DataSource = this.tblAddedDeliveryProductsBindingSource;
}
As far as I understood your previous post with the names of the bindingsources + entities, I've recreated the same structure with northwind, customer + orders. So my previous post solves your problem, but it perhaps is not that understandable because your code looks different, so if you can describe the things I mentioned above, we can rewrite the code I posted so it reflects your situation.
<designerCs>
this.dgvDeliveryProducts = new System.Windows.Forms.DataGridView();
this.barCodeDataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.unitPriceDataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.qtyDataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tblAddedDeliveryProductsBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.BindingSourceTblDelivery = new System.Windows.Forms.BindingSource(this.components);
this.currDeliveriesX = new dalExpressZaxSnax.CollectionClasses.TblDeliveryCollection();
</designerCs>
This doesn't make any sense:
delivery entity product entity driver entity run entity
I think delivery and product are the most important. relations: delivery, product related by delivery.barcode 1: n product.barcode.
<schema> tblDelivery deliveryId PK deliveryDate runId FK driverId FK
tblProduct barCode PK productName price
tblDeliveryProducts (this is the mapping table) deliveryId PK barCode FK </schema>
You have 3, not 2, entities involved in the relation delivery - product. So this: delivery, product related by delivery.barcode 1: n product.barcode. isn't true because they use a 3rd entity to relate to eachother (tblDeliveryProducts), or am I missing something very important?
So if I'm understanding it correctly (as I would have modelled it) is that you have a delivery, one or more DeliveryProduct entities per Delivery and Delivery has an 1:n relation with that DeliveryProduct entity and Product has too an 1:n relation with DeliveryProduct, which means Delivery-Product is an m:n relation. Which is readonly by default.
Though, you set the DataMember of the bindingsource in the grid to TblDeliveryProducts, which is the intermediate entity which has 2 columns and not the products you're looking for. So now I'm very confused.
Joined: 29-Jun-2005
ok, please bear with me.
You have 3, not 2, entities involved in the relation delivery - product. So this: delivery, product related by delivery.barcode 1: n product.barcode. isn't true because they use a 3rd entity to relate to eachother (tblDeliveryProducts), or am I missing something very important?
Ok, you are correct. I'm not used to using the above terminolgy, so I probably made a mistake.I was also trying to simplify it earlier, so again I probably did something wrong.The schema that I described is correct.
So if I'm understanding it correctly (as I would have modelled it) is that you have a delivery, one or more DeliveryProduct entities per Delivery and Delivery has an 1:n relation with that DeliveryProduct entity and Product has too an 1:n relation with DeliveryProduct, which means Delivery-Product is an m:n relation. Which is readonly by default.
well, I can edit the "quanity" of the deliveryProduct in the grid, and it is persisted.
Though, you set the DataMember of the bindingsource in the grid to TblDeliveryProducts, which is the intermediate entity which has 2 columns and not the products you're looking for. So now I'm confused
Yes, I do set the datamember as "TblDeliveryProducts".However, the grid correctly displays the following fields:
deliveryId barCode productName unitPrice qty
I'm not sure where we go from here.Once again, I apologise for any confusion I caused by attempting to simplify the post.
I don't want to add any more at the minute in case of more confusion.Finally, have I stopped cofusing you? :-0
many thanks,
yogi :-)
Though where does tblProduct stand? Is that one even important? I don't think it is.
So if you have the setup I know think you have, you can simply replace Delivery with Customer, and Deliveryproduct with Order and you have the setup I showed you earlier on.
Joined: 29-Jun-2005
ok, yes, we can remove tblProduct from the equation.
only problem to solve here is how to set the AllowRemove property on the RIGHT collection)
Two bindingsources: 1) _bsMain 2) _bsGrid.
datagridView1.dataSOURCE= _bsGrid
_bsGrid.dataSOURCE = _bsMain. _bsGrid.dataMEMBER= _"Orders" This means that the OrdersCollection of the ACTIVE Customer is shown.
_bsMain.DataSource = to customersCollection1, which is an instance of northwind CustomerCollection
then,
So if you have the setup I know think you have, you can simply replace: 1) Delivery with Customer, 2) Deliveryproduct with Order .... and you have the setup I showed you earlier on.
No, this doesn't work.It now doesn't even display the correct data in the grid, simply a "deliveryId" column.
Below is th setup I have that does everything apart from allow the user to delete the row.
dgvDeliveryProducts.dataSOURCE = tblAddedDeliveryProductsBindingSource
tblAddedDeliveryProductsBindingSource. dataMEMBER = TblDeliveryProducts tblAddedDeliveryProductsBindingSource. dataSOURCE = BindingSourceTblDelivery
BindingSourceTblDelivery.dataSOURCE = currDeliveriesX
"currDeliveriesX" is an instance of TblDeliveryCollection.
WHY it doesn't work if I bind currDeliveriesX DIRECTLY to "tblAddedDeliveryProductsBindingSource. dataSOURCE"...I'll never know.
I really don't know where to go from here.
many thanks,
yogi
yogiberr wrote:
ok, yes, we can remove tblProduct from the equation.
only problem to solve here is how to set the AllowRemove property on the RIGHT collection)
Two bindingsources: 1) _bsMain 2) _bsGrid.
datagridView1.dataSOURCE= _bsGrid
_bsGrid.dataSOURCE = _bsMain. _bsGrid.dataMEMBER= _"Orders" This means that the OrdersCollection of the ACTIVE Customer is shown.
_bsMain.DataSource = to customersCollection1, which is an instance of northwind CustomerCollection
then,
So if you have the setup I know think you have, you can simply replace: 1) Delivery with Customer, 2) Deliveryproduct with Order .... and you have the setup I showed you earlier on.
No, this doesn't work.It now doesn't even display the correct data in the grid, simply a "deliveryId" column.
That's a bug in the datagridview I reported over a year ago to Microsoft and which they've 'postponed' to after Orcas
You can solve it by setting the datasource of the datagridview to None, then setup the bindingsources correctly and then setting the datasource of the datagridview back to the bndingsource.
Below is th setup I have that does everything apart from allow the user to delete the row.
dgvDeliveryProducts.dataSOURCE = tblAddedDeliveryProductsBindingSource
tblAddedDeliveryProductsBindingSource. dataMEMBER = TblDeliveryProducts tblAddedDeliveryProductsBindingSource. dataSOURCE = BindingSourceTblDelivery
BindingSourceTblDelivery.dataSOURCE = currDeliveriesX
"currDeliveriesX" is an instance of TblDeliveryCollection.
WHY it doesn't work if I bind currDeliveriesX DIRECTLY to "tblAddedDeliveryProductsBindingSource. dataSOURCE"...I'll never know.
I really don't know where to go from here.
I answered that in my post with the code, but to recap: if you do that, there's no 'active' parent row in currDeliveriesX and therefore there's no active selected datamember (child) set so the grid doesn't display anything.
You're effectively creating a master-detail setup, but without the master grid, just the details, however what to display in the details depends on what's selected in the master, but you don't have that master grid.
Joined: 29-Jun-2005
right,
So it can't be done without a master detail grid?
In effect I am doing something similar to master detail..
I use a pop-up form to select the "current" delivery.
private void txtViewDeliveries_Click(object sender, EventArgs e)
{
frmDeliverySelection deliverySelector = new frmDeliverySelection();
deliverySelector.ShowDialog(this);
SetDeliveryAsCurrent(deliverySelector.SelectedDeliveryId);
}
Then, in the pop up winform that "mimics" a master detail, I do the following:
private void frmDeliverySelection_Load(object sender, EventArgs e)
{
tblDeliveryCollection1.GetMulti(null);
dataGridView1.DataSource = tblDeliveryCollection1;
}
private void button1_Click(object sender, EventArgs e)
{
TblDeliveryEntity delivery = new TblDeliveryEntity();
delivery = (TblDeliveryEntity)this.dataGridView1.CurrentRow.DataBoundItem;
_selectedDeliveryId = delivery.DeliveryId;
this.Close();
}
I'd have no qualms about using a masterDetail, but would this definitely work, and give me the ability to delete the rows?
I'm looking for a sure thing here, a solution that works, and doesn't throw up some MS bug or whatever.Would a master detail definitely do exactly the same my app does just now, AND give me the ability to delete delivery products?
I think it's reasonable for me to be wary of going down a different route..only to be told later that this route (for whaterver reason) won't work.
many thanks,
yogi :-)
So it can't be done without a master detail grid?
It depends on what you mean by "it".
If you mean 'Deleting that Row frm the Grid", then the answer is: Yes, there different ways to do anything.
If you mean "using the Master-Detail technique effectively without using a Master-Detail controls", then the answer is: I don't think so, or at least won't be the recommended way. And for that it won't be the easiest way too. So I recommend you to leave this route.
So if you want to stick with your GUI design, in which you return the **_selectedDeliveryId** from the pop-up window. Then all you have to do is: Fetch the TblDeliveryProducts alone using the filter and bind it to the gridView.
private void DisplayDeliveryProducts()
{
PredicateExpression filter = new PredicateExpression();
filter.Add(PredicateFactory.CompareValue(TblDeliveryProductsFieldIndex.DeliveryId, ComparisonOperator.Equal, _selectedDeliveryId));
TblDeliveryProductsCollection TblDeliveryProducts = new TblDeliveryProducts();
TblDeliveryProducts.GetMulti(filter);
TblDeliveryProducts.AllowRemove = true;
TblDeliveryProducts.AllowEdit = true;
TblDeliveryProducts.SupportsSorting = true;
// bind the collection to the bindingSource
tblAddedReturnsBindingSource.DataSource = TblDeliveryProducts;
// bind the bindingSource to the Grid
dgvDeliveryProducts.DataSource = tblAddedReturnsBindingSource;
}
Joined: 29-Jun-2005
hiya,
I think we're almost there. yes, I am able to succesfully remove rows..:-)
To do this I had to change your code slighty and add "TblDeliveryProducts" as a design time instance of TblDeliveryProductsCollection
However, There is the issue of keeping the comboboxes in-sync with the current delivery...eg, cboDrivers needs to display the correct "delivery driver"
At the moment, it is bound as follows:
cboDrivers.DataBindings.Clear();
cboDrivers.DataBindings.Add(new Binding("SelectedValue", this.BindingSourceTblDelivery, dalExpressZaxSnax.TblDriverFieldIndex.DriverId.ToString(), true));
"BindingSourceTblDelivery" is bound to the deliveryCollection (which is the parent)..I don't know how to do this...
If you mean "using the Master-Detail technique effectively without using a Master-Detail controls", then the answer is: I don't think so, or at least won't be the recommended way. And for that it won't be the easiest way too. So I recommend you to leave this route.
OK, I'm confused.All I have ever wanted to do was: 1) keep my GUI and functionality the same 2) ADD the ability to delete rows from the datagridView.
If I can't do ALL of the above, then I will try do a master detail implementation.Walaa, can you confirm that I will HAVE to do a master detail implementation?..being able to delete a row in the datagridView isn't going to help me unless I can do it "in addition" to the functionality that I already have.
cheers,
yogi
Joined: 29-Jun-2005
Ok,
I agree, I'm pretty much lost in what to say next to get this fully working as I can't find the exact detail why it works in my test app but not in your app.
The very short answer to that would be for me to send my code... I think everyone has tried their best but it's just not happening.
If you don't want me to send my code, then I think the next best thing is for me to try the above in a master detail winforms 2.0, specific to LlblGenPro.
I have seen dataset examples on the web, but I can't find LlblGenPro samples on the site. As I say, I can send code, but failing that, can anyone point me to an LlbGenPro winforms 2.0 master detail sample?
Many thanks,
yogi
yogiberr wrote:
Ok,
I agree, I'm pretty much lost in what to say next to get this fully working as I can't find the exact detail why it works in my test app but not in your app.
The very short answer to that would be for me to send my code... I think everyone has tried their best but it's just not happening.
If you don't want me to send my code, then I think the next best thing is for me to try the above in a master detail winforms 2.0, specific to LlblGenPro.
I have seen dataset examples on the web, but I can't find LlblGenPro samples on the site. As I say, I can send code, but failing that, can anyone point me to an LlbGenPro winforms 2.0 master detail sample?
Many thanks, yogi
I think a short example would be best indeed.
We have a master-detail example, it's the winforms app in the examples section on the general site. It uses master-detail databinding (not with binding sources, so you have to invest a couple of minutes to add these instead). If you could add a little code to that example to show us what you mean it would be great!
Joined: 29-Jun-2005
ok,
I download the: 1) sample nothwind database from the web. 2) Northwind databinding example.
The Northwind.DAL does not build, giving me 21 errors along the lines of:
Error 7 The non-generic type 'SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase' cannot be used with type arguments D:\zaxSnax\toDoZak\Example_ComplexDatabinding_NET20_07112006\DAL\CollectionClasses\ShipperCollection.cs 34 43 Northwind.DAL
etc, etc, etc.
What I am doing in the above is spending frustrating time trying to get a sample app to work that I will HOPEFULLY be able to tweak to match exactly what is in my app...The scope for error, more frustration, and another 20 posts on this forum is enormous..no-one wins, everyone is frustrated.
If it was an easy issue that could be exaplained by samples and forum posts, it would have been solved a long time ago.Probably, the fault lies on my side, in that I have omitted something.I accept this, but this only backs up the fact that it is a waste of time to keep going down this route.
I really, really think that at this stage it would be better if i could:
1) remove everything from my app that is not essential to this issue 2) send you the tiny (1x winform) app that contains the DBF file in the BIN folder. 3) quickly go thru any discrepencies.
If you really do not want me to send the code, then yes, I will somehow try to replicate in a master detail scenario...but this is only going to lead to more frustration and assumption etc.
Please let me know asap what I should do.
cheers,
yogi
VS.NET references are pointing to llblgen pro 1.0.2005.1 assemblies because vs.net does this automatically WRONG. THe project files contain the correct reference to the v2.0 assemblies, vs.net ignores these unfortunately.
Please fix these manually. I can take heat for stuff I do wrong, I wont' take heat for Microsoft's screw ups or their wacky docs related to databinding. This reference crap is their fault, so please fix it manually, should take 20 seconds.
THough you should use the northwind example, that one contains a master-detail form (customer, orders, order details).
Joined: 29-Jun-2005
ok, i tried
I see frpm a previous post tha you advise:
It will pick the first SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll it sees, which is the wrong one. Please change the reference to the right runtime lib manually.
I have: 1) removed the 2 references in northwind.DAL i) SD.LLBLGen.Pro.DQE.SqlServer.NET20 ii) SD.LLBLGen.Pro.ORMSupportClasses.NET20
2) browsed to C:\Program Files\Solutions Design\LLBLGen Pro\RuntimeLibraries\DotNet20 and added these refrences.
3) rebuilt...
Same errors as before.If what I have done is wrong, what should I do, in order to
fix these manually.
cheers,
yogi
2) browsed to C:\Program Files\Solutions Design\LLBLGen Pro\RuntimeLibraries\DotNet20
That's the v1.0.2005.1 installation folder
You should add references to the assemblies in: C:\Program Files\Solutions Design\LLBLGen Pro v2.0\RuntimeLibraries\DotNet20
Joined: 29-Jun-2005
right,
I can't see the "LLBLGen Pro v2.0" folder anywhere on my machine.I assume it means that I don't have the v2.0 runtimes.
I'm only on v1.0.2005.1
I have been on the general + customer site, and I can't see a link for the v2.0 runtimes download..
I assume that I have to download these runtimes? Does anyone know where they are?
many thanks,
yogi
yogiberr wrote:
right,
I can't see the "LLBLGen Pro v2.0" folder anywhere on my machine.I assume it means that I don't have the v2.0 runtimes.
I'm only on v1.0.2005.1
I have been on the general + customer site, and I can't see a link for the v2.0 runtimes download..
I assume that I have to download these runtimes? Does anyone know where they are?
Oh dear, I think I indeed made a mistake here, my sincere appologies. You already said you were on v1.0.2005.1, so I shouldn't have assumed you could use the examples available on our main website which are for v2.0. Sorry for letting you wade through the frustration with this example.
You can download the example you need from the 1.0.2005.1 section of the website -> examples section. To make it easy for you, I've attached the example to this post as well, and it's already migrated to .NET 2.0 for you.
The example doesn't use bindingsource controls, but in the routine BindOrders() in CustomerManager, you'll see the code how I bind the current customer's Orders to the grid and also the order details to the orderdetails grid.
I hope this example is a start to let you explain to us what you want.
Joined: 29-Jun-2005
ok,
You can download the example you need from the 1.0.2005.1 section of the website -> examples section. I've attached the example to this post as well, and it's already migrated to .NET 2.0 for you.
I didn't see the attachment in the post, So I just download "Northwind Example 1 (C#) " from the 1.0.2005.1 section.
I converted to winforms 2.0, ( no converion errors)
Obviously, this doesn't contain the userDeletingRow event, but unless you tell me otherwise; i'll work with this example to give a more familiar example to follow.
cheers,
yogi