Using WebBusinessBindingSource with DevExpress 8.1.1 ASPxGridView


Author
Message
Mark Dowlearn
Mark Dowlearn
StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)
Group: Forum Members
Posts: 34, Visits: 9.9K
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 ....)
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
(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

Mark Dowlearn
Mark Dowlearn
StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)
Group: Forum Members
Posts: 34, Visits: 9.9K
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.

 

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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).

Mark Dowlearn
Mark Dowlearn
StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)
Group: Forum Members
Posts: 34, Visits: 9.9K
Thans -- I'll contintue to work on figuring it out.

m

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Let me know if you don't make any progress and I will see if I can reproduce.
Chan
Chan
Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
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
Chan
Chan
Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Any update on this? I need it very urgently.

Thank you
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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.
Chan
Chan
Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Please find the attached sample project.



Thank you
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search