omar wrote:
Greetings,
In a webform, I am trying to bind an OrderDetails collection to an Ms-DataGrid.
At design time, I drag an Orders collection (dsOrders), then I set the grid's data-source to (dsOrders) (the grid automatically displays all the columns of dsOrders); then I want to set the DataMember to OrderDetailsCollection member of the orders collection. The DataMember property's dropdown does list any member-collections of the dsOrders collection.
1- should I set the DataMember property to OrderDetailsCollection manually (if so, this meens I have to define the OrderDetails columns manually to the grid)
You should drag an orderdetailscollection onto the form, design the grid, and bind an orders collection at runtime, setting the datamembers to "OrderDetails".
VS.NET's asp.net editor in vs.net 2003 doesn't work very well.
Is design-time binding broken in ASP.NET
Yes. "MS way or the highway".
2- Is there away to have the same design-time support we have for winform's data-grid in asp.net's data-grid
I wish there was, unfortunately, databinding is still not implemented as you would want it to be. In VS.NET 2005, asp.net databinding gets even worse.