StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      


12»»

Using WebBusinessBindingSource with...Expand / Collapse
Author
Message
Posted 06/22/2008 1:42:52 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 08/24/2008 11:05:11 PM
Posts: 34, Visits: 9,937
Hello,

I'm doing a test web page with a DevExpress 8.1.1 ASPxGridView and a WebBusinessBindingSource.

I've linked the WebBusinessBindingSource to a SF BO that represents a SQL2005 table. It has some custom properties on it but aside from that is a straight mapping of the table.

I've set the data source for the grid to the WebBusinessBindingSource. (The grid doesn't appear to like the custom properties, so I've just loaded a couple of varchar fields as columns and under those conditions it appears to work ok for setting up the columns and displaying them).

I populate the WebBusinessBindingSource's underlying BO in the PageLoad method of the page.

When I run the page, the BO seems to properly populate with about 140 records, but the grid displays just the first row and then repeats the first row for all the remaining rows that it displays.

I'm able to get all rows to display when using a SqlDataSource, so I am thinking this has something to do with the WebBusinessBindingSource.

It feels like I've got to be missing something simple here -- any suggestions as to why the single row repeats in the display?

And has anyone had any experience with using custom properties as sources for the grid columns? (Not sure why this doesn't work ....)
Post #17221
Posted 06/23/2008 8:05:52 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:58:13 AM
Posts: 4,379, Visits: 4,421
(The grid doesn't appear to like the custom properties, so I've just loaded a couple of varchar fields as columns and under those conditions it appears to work ok for setting up the columns and displaying them).

You need to override the GetCustomBindablePropertyDescriptors method and provide a ReflectionPropertyDescriptor for each custom property so that it can be bound.

but the grid displays just the first row and then repeats the first row for all the remaining rows that it displays.

It sounds like something is repositioning the BO for each exposed row in the IBindingList implementation.  This can happen for a number of reasons: filters, sorts, other navigation code within an event of the BO, etc.

And has anyone had any experience with using custom properties as sources for the grid columns? (Not sure why this doesn't work ....)

There are a LOT of posts out here on the forum in this regard.  Here are just a few:

http://forum.strataframe.net/FindPost15985.aspx (This sample shows how to create a custom property and add a broken rule to that custom property)

http://forum.strataframe.net/FindPost17063.aspx

Post #17231
Posted 06/23/2008 11:35:26 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 08/24/2008 11:05:11 PM
Posts: 34, Visits: 9,937
Hello, Trent -

>>>You need to override the GetCustomBindablePropertyDescriptors method and provide a ReflectionPropertyDescriptor for each custom property so that it can be bound.

I've already overridden the GetCustomBindablePropertyDescriptors method and have been using custom properties successfully with other controls.  It appears to me to be something specific to the interaction with SF and the DevExpress control. 

>>>It sounds like something is repositioning the BO for each exposed row in the IBindingList implementation.  This can happen for a number of reasons: filters, sorts, other navigation code within an event of the BO, etc.

Hmmm....There are no filters or sorts on the BO, just a plain vanilla "FillAll()" and hook it up to the grid using a WebBusinessBindingSource.  No navigation code either.  I'll look at debugging through the source code unless there's something specific you would suggest.

>>>There are a LOT of posts out here on the forum in this regard.  Here are just a few:
>>>http://forum.strataframe.net/FindPost15985.aspx (This sample shows how to create a custom property and add a broken rule to that custom property)
>>>http://forum.strataframe.net/FindPost17063.aspx

Yes, these have been very helpful.  Still don't know why custom properties work with other controls but not the DevExpress control using the WebBusinessBindingSource, however.

 

Post #17244
Posted 06/23/2008 12:48:58 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:58:13 AM
Posts: 4,379, Visits: 4,421
I've already overridden the GetCustomBindablePropertyDescriptors method and have been using custom properties successfully with other controls.  It appears to me to be something specific to the interaction with SF and the DevExpress control.

The DevExpress control should be totally irrelevant as the IBindingList implementation doesn't care about the control but rather speaking straight to the interface properties and methods.

The first thing I would do is take the BO in question and bind it to a WinForms grid through a standard BBS, then if that worked, take the WBBS and binding to a control other than the DevExpress grid (I have never attempted to use the web DevExpress grid, so I am afraid I cannot be of much help there without having to setup and get my head into this control itself, though I do not beleive that this is the problem anyway).

Post #17245
Posted 06/23/2008 10:48:21 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 08/24/2008 11:05:11 PM
Posts: 34, Visits: 9,937
Thans -- I'll contintue to work on figuring it out.

m

Post #17271
Posted 06/23/2008 11:50:03 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:58:13 AM
Posts: 4,379, Visits: 4,421
Let me know if you don't make any progress and I will see if I can reproduce.
Post #17272
Posted 06/26/2008 2:26:54 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Today @ 3:35:18 AM
Posts: 414, Visits: 1,567
Hi,
I also faced the same problem. I tried to bind the same WebBBS to AspxCombobox and it is working fine.

Any ideas?

Thank you
Post #17371
Posted 06/30/2008 9:15:47 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Today @ 3:35:18 AM
Posts: 414, Visits: 1,567
Hi,
Any update on this? I need it very urgently.
Thank you
Post #17472
Posted 06/30/2008 9:37:02 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:58:13 AM
Posts: 4,379, Visits: 4,421
We have it on a list to look at but as of yet we have not reproduced.  You are welcome to post a sample that reproduces the problem so that we can more quickly reproduce the issue.
Post #17473