|
-
Complex Data Consumer Data Aware Classes
Hi Deborah,
I have written to you before (you may remember) and maybe this platform
might yield an answer to the problem I posed some time ago...who knows, maybe
with some other interested parties.
Scenario: Data Source Class, Data Consumer Complex Class and a piece of
Main Code doing the instantiating and binding. I Bind the DataSource to the
BindingCollection.DataSource and 'try' to bind 'something' from the DataConsumer
to the BindingCollection.
In coding a Complex Data Consumer, I followed the 2 'starter' templates
provided by yourself (at InStep) and Microsoft. In both of the templates
there are a LET/GET of a DataMemeber Property and a SET/GET of a DataSource
Property. This coding seems to be pretty much standard in so far as what
it does, however the outstanding issues I have at the moment are the
a) Binding Collection syntax
b) and thus the Jump from the DataSource Class when 'something' happens.
Now, here is the information from Microsoft (Forms and Data-Aware Controls
VB Concepts).
>>>>>>>>>>
However, for complex data consumers such as the DataGrid, the DataField and
DataFormat properties aren’t required, as the control handles them for you.
>>>>>>>>>>
This would seem to suggest that the DataField should not be passed when binding
the Complex Data Consumer to the Binding Collection as in theory we are dealing
with a RowSet rather than an individual field with 'this' Data Consumer.
And here is the conundrum...If in a Simple Data Consumer, as
soon as a Property Changes the Binding Collection wakes up the Data Consumer
because...
1. UpdateMode BindingCollection is vbUpdateWhenPropertyChanges (Note: vbUpdateWhenRowChanges
naturally works also)
2. Recognises the DataField that was bound.
Now if in the Complex DataConsumer the UpdateMode was indeed changed to vbUpdateWhenRowChanges
then when the DataSource carries out a .MoveNext the DataConsumer Code should
be entered 'Somewhere'....And that 'Somewhere' is the Real Question....
Deborah, this may sound like a scratchy record but just like you said on
one of your previous postings that you handle all Data Access in one 'Module'
and change Business Objects per project, the use of this Complex Data Consumer
would I'm sure help with the overall Object Oriented Approach that we are
endeavoring to adopt.
Regards,
Desmond.
-
Re: Complex Data Consumer Data Aware Classes
Hi Desmond -
Someone else asked about this in this newsgroup and were referred to a VBPJ
article that someone else wrote. You may want to check that out.
Good luck!
Deborah
Desmond Cassidy wrote in message <38fc1b99$1@news.devx.com>...
>
>Hi Deborah,
> I have written to you before (you may remember) and maybe this platform
>might yield an answer to the problem I posed some time ago...who knows,
maybe
>with some other interested parties.
>
> Scenario: Data Source Class, Data Consumer Complex Class and a piece of
>Main Code doing the instantiating and binding. I Bind the DataSource to the
>BindingCollection.DataSource and 'try' to bind 'something' from the
DataConsumer
>to the BindingCollection.
>
> In coding a Complex Data Consumer, I followed the 2 'starter' templates
>provided by yourself (at InStep) and Microsoft. In both of the templates
>there are a LET/GET of a DataMemeber Property and a SET/GET of a DataSource
>Property. This coding seems to be pretty much standard in so far as what
>it does, however the outstanding issues I have at the moment are the
>a) Binding Collection syntax
>b) and thus the Jump from the DataSource Class when 'something' happens.
>
>Now, here is the information from Microsoft (Forms and Data-Aware Controls
>VB Concepts).
>>>>>>>>>>>
>However, for complex data consumers such as the DataGrid, the DataField and
>DataFormat properties aren’t required, as the control handles them for you.
>
>>>>>>>>>>>
>This would seem to suggest that the DataField should not be passed when
binding
>the Complex Data Consumer to the Binding Collection as in theory we are
dealing
>with a RowSet rather than an individual field with 'this' Data Consumer.
>
>
>And here is the conundrum...If in a Simple Data Consumer, as
>soon as a Property Changes the Binding Collection wakes up the Data
Consumer
>because...
>1. UpdateMode BindingCollection is vbUpdateWhenPropertyChanges (Note:
vbUpdateWhenRowChanges
>naturally works also)
>2. Recognises the DataField that was bound.
>
>Now if in the Complex DataConsumer the UpdateMode was indeed changed to
vbUpdateWhenRowChanges
>then when the DataSource carries out a .MoveNext the DataConsumer Code
should
>be entered 'Somewhere'....And that 'Somewhere' is the Real Question....
>
>Deborah, this may sound like a scratchy record but just like you said on
>one of your previous postings that you handle all Data Access in one
'Module'
>and change Business Objects per project, the use of this Complex Data
Consumer
>would I'm sure help with the overall Object Oriented Approach that we are
>endeavoring to adopt.
>
>Regards,
>
>Desmond.
>
>
-
Re: Complex Data Consumer Data Aware Classes
> Someone else asked about this in this newsgroup
> and was referred to a VBPJ article that someone else
> wrote. You may want to check that out.
Desmond: I believe the article to which Deborah refers is "Supercharge Data
Binding" in the March, 2000 issue of VBPJ
( http://www.devx.com/upload/registere...ar00/kf0300/kf
0300.asp ).
---
Phil Weber
-
Re: Complex Data Consumer Data Aware Classes
Phil, Deborah,
Thanks for the pointer to the article. I have read just about every article
there is available on this particular subject BUT without referring to what
I am 'really' asking and that is "Binding a DataSource to a Complex Bound
Data Consumer". The key issue being binding the Complex Data Consumer to
the Binding Collection AND the events in the Data Source that will FIRE the
DataConsumer into Action. I am just wondering if Keith Franklin ( who wrote
that article on Supercharge Data-Binding) may be listening in on this conversation.
Again anyone out there who has either seen, know how to do it or even come
back with a 'Yeah, its like Zen, simple but not easy, do it with this approach'
most definitely would be appreciated.
Best Regards,
Desmond.
"Phil Weber" <pweber@teleport.com> wrote:
> > Someone else asked about this in this newsgroup
> > and was referred to a VBPJ article that someone else
> > wrote. You may want to check that out.
>
>Desmond: I believe the article to which Deborah refers is "Supercharge Data
>Binding" in the March, 2000 issue of VBPJ
>( http://www.devx.com/upload/registere...ar00/kf0300/kf
>0300.asp ).
>---
>Phil Weber
>
>
Similar Threads
-
By Chicho in forum VB Classic
Replies: 11
Last Post: 10-01-2003, 12:00 AM
-
By saly in forum VB Classic
Replies: 12
Last Post: 02-01-2003, 11:27 PM
-
By Larry Williams in forum VB Classic
Replies: 0
Last Post: 07-06-2000, 10:19 AM
-
By TOM LENG in forum VB Classic
Replies: 0
Last Post: 06-14-2000, 03:50 AM
-
By leonardo in forum authorevents.kurata
Replies: 3
Last Post: 04-18-2000, 11:44 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks