467,923 Members | 1,252 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,923 developers. It's quick & easy.

how to force a 'SyncWithCurrencyManager' update

I have multiple controls set to the same database and, normally, when I
change the record in one control the position is also changed in the other
controls because I have "syncwithcurrencymanager' set to true for all the
controls. I'm assuming that actual syncwithcurrencymanager for all the
controls gets executed when the event "BindingManagerPositionChanged" fires.

The problem occurs when I set a RowFilter on the defaultview of the table in
the dataset. If the application of the RowView causes the current record to
change (because the previously displayed record didn't match the filter
criteria) then the BindingContext(...).position changes BUT the
BindingManagerPositionChanged event does NOT fire. The record in the other
controls does not change. After applying the filter I need to click my
"Next Rec" then "Prev Rec" buttons to the the controls synced up again.

I probably can programmatically do a "next rec" and then a "prev rec" but
that won't work if the RowFilter results in only 1 record being exposed.

So the question is this: If I apply a RowFilter to a table how do I force
the SyncWithCurrencyManager to update all the controls that are controlled
by BindingContextManager?

Thanks...
Aug 25 '06 #1
  • viewed: 1824
Share:
5 Replies
John,

I have searched on internet (Google and MSDN's) for SyncWithCurrencyManager
and got one message.

However can you explain to us what property or whatever this is?

Cor

"JohnR" <Jo******@hotmail.comschreef in bericht
news:9TEHg.10$XD1.5@trnddc01...
>I have multiple controls set to the same database and, normally, when I
change the record in one control the position is also changed in the other
controls because I have "syncwithcurrencymanager' set to true for all the
controls. I'm assuming that actual syncwithcurrencymanager for all the
controls gets executed when the event "BindingManagerPositionChanged"
fires.

The problem occurs when I set a RowFilter on the defaultview of the table
in the dataset. If the application of the RowView causes the current
record to change (because the previously displayed record didn't match the
filter criteria) then the BindingContext(...).position changes BUT the
BindingManagerPositionChanged event does NOT fire. The record in the
other controls does not change. After applying the filter I need to click
my "Next Rec" then "Prev Rec" buttons to the the controls synced up again.

I probably can programmatically do a "next rec" and then a "prev rec" but
that won't work if the RowFilter results in only 1 record being exposed.

So the question is this: If I apply a RowFilter to a table how do I force
the SyncWithCurrencyManager to update all the controls that are controlled
by BindingContextManager?

Thanks...

Aug 25 '06 #2
PGC
Cor,

This sounds like one of the properties on some of the Infragistics controls.
JohnR would be probably be better going to www.infragistics.com to get an
answer.

Paul

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:eQ**************@TK2MSFTNGP03.phx.gbl...
John,

I have searched on internet (Google and MSDN's) for
SyncWithCurrencyManager and got one message.

However can you explain to us what property or whatever this is?

Cor

"JohnR" <Jo******@hotmail.comschreef in bericht
news:9TEHg.10$XD1.5@trnddc01...
>>I have multiple controls set to the same database and, normally, when I
change the record in one control the position is also changed in the other
controls because I have "syncwithcurrencymanager' set to true for all the
controls. I'm assuming that actual syncwithcurrencymanager for all the
controls gets executed when the event "BindingManagerPositionChanged"
fires.

The problem occurs when I set a RowFilter on the defaultview of the table
in the dataset. If the application of the RowView causes the current
record to change (because the previously displayed record didn't match
the filter criteria) then the BindingContext(...).position changes BUT
the BindingManagerPositionChanged event does NOT fire. The record in the
other controls does not change. After applying the filter I need to
click my "Next Rec" then "Prev Rec" buttons to the the controls synced up
again.

I probably can programmatically do a "next rec" and then a "prev rec" but
that won't work if the RowFilter results in only 1 record being exposed.

So the question is this: If I apply a RowFilter to a table how do I
force the SyncWithCurrencyManager to update all the controls that are
controlled by BindingContextManager?

Thanks...


Aug 25 '06 #3
Hi Cor,

Yes, Paul is correct. SyncWithCurrencyManager is an Infragistics
property. It determines if you wish the control to 'sync' with the
currencymanager or not. However, the basic problem is the same. The
question is whether it is a microsoft behavior or a behavior specific to the
Infragistic control... so let me rephrase the question and see if anybody
can shed some light on the issue...

Assuming you have multiple controls that are updated with the same
currencymanager, if you change the current record by, lets say, incrementing
the bindingmanager.position property then ALL the controls point to the same
new record. I suspect, but can't prove, that this is a reaction to the
BindingManagerBase.PositionChanged event firing. However if you change the
current record by virture of applying a RowFilter to the DataView then what
I'm seeing is that only the control that has focus when the
DataView.RowFilter was applied gets changed. The other controls still point
to the original record. I believe this is happening because, if the record
changes because you changed the RowFilter, the
BindingManagerBase.PositionChanged event does NOT fire (that I verified),
and, hence, the other controls never get notified to update their current
record.

My user interface is a tabbed display with one tab having the individual
fields displayed for the 'current' record. The other tab is an Infragistics
grid that has a row for each record in the database. By choosing a row (in
the grid row view tab) or buy clicking Prev Rec or Next Rec on the main tab
display everything works fine. The only issue is that if you are on the
main tab and set a rowfilter, the data on the main tab changes properly, but
the datagrid on the other tab does not.

I will also post this to the Infragistics site and see if anybody there can
tell me if it's a Infragistics issue or not.

Thanks, John

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:eQ**************@TK2MSFTNGP03.phx.gbl...
John,

I have searched on internet (Google and MSDN's) for
SyncWithCurrencyManager and got one message.

However can you explain to us what property or whatever this is?

Cor

"JohnR" <Jo******@hotmail.comschreef in bericht
news:9TEHg.10$XD1.5@trnddc01...
>>I have multiple controls set to the same database and, normally, when I
change the record in one control the position is also changed in the other
controls because I have "syncwithcurrencymanager' set to true for all the
controls. I'm assuming that actual syncwithcurrencymanager for all the
controls gets executed when the event "BindingManagerPositionChanged"
fires.

The problem occurs when I set a RowFilter on the defaultview of the table
in the dataset. If the application of the RowView causes the current
record to change (because the previously displayed record didn't match
the filter criteria) then the BindingContext(...).position changes BUT
the BindingManagerPositionChanged event does NOT fire. The record in the
other controls does not change. After applying the filter I need to
click my "Next Rec" then "Prev Rec" buttons to the the controls synced up
again.

I probably can programmatically do a "next rec" and then a "prev rec" but
that won't work if the RowFilter results in only 1 record being exposed.

So the question is this: If I apply a RowFilter to a table how do I
force the SyncWithCurrencyManager to update all the controls that are
controlled by BindingContextManager?

Thanks...


Aug 25 '06 #4
John,

That is in my idea why you can create New dataviews

With a New dataview you normally use its own currencymanager
With just declaring a dataview, you set a pointer to an old one (the
defaultview).

This is why you can create seperate dataviews, every datatable contains
already a dataview which is the property defaultview.

I hope that this answers slightly your question.

Cor

"JohnR" <Jo******@hotmail.comschreef in bericht
news:ulIHg.41$Xl5.20@trnddc06...
Hi Cor,

Yes, Paul is correct. SyncWithCurrencyManager is an Infragistics
property. It determines if you wish the control to 'sync' with the
currencymanager or not. However, the basic problem is the same. The
question is whether it is a microsoft behavior or a behavior specific to
the Infragistic control... so let me rephrase the question and see if
anybody can shed some light on the issue...

Assuming you have multiple controls that are updated with the same
currencymanager, if you change the current record by, lets say,
incrementing the bindingmanager.position property then ALL the controls
point to the same new record. I suspect, but can't prove, that this is a
reaction to the BindingManagerBase.PositionChanged event firing. However
if you change the current record by virture of applying a RowFilter to the
DataView then what I'm seeing is that only the control that has focus when
the DataView.RowFilter was applied gets changed. The other controls still
point to the original record. I believe this is happening because, if the
record changes because you changed the RowFilter, the
BindingManagerBase.PositionChanged event does NOT fire (that I verified),
and, hence, the other controls never get notified to update their current
record.

My user interface is a tabbed display with one tab having the individual
fields displayed for the 'current' record. The other tab is an
Infragistics grid that has a row for each record in the database. By
choosing a row (in the grid row view tab) or buy clicking Prev Rec or Next
Rec on the main tab display everything works fine. The only issue is that
if you are on the main tab and set a rowfilter, the data on the main tab
changes properly, but the datagrid on the other tab does not.

I will also post this to the Infragistics site and see if anybody there
can tell me if it's a Infragistics issue or not.

Thanks, John

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:eQ**************@TK2MSFTNGP03.phx.gbl...
>John,

I have searched on internet (Google and MSDN's) for
SyncWithCurrencyManager and got one message.

However can you explain to us what property or whatever this is?

Cor

"JohnR" <Jo******@hotmail.comschreef in bericht
news:9TEHg.10$XD1.5@trnddc01...
>>>I have multiple controls set to the same database and, normally, when I
change the record in one control the position is also changed in the
other controls because I have "syncwithcurrencymanager' set to true for
all the controls. I'm assuming that actual syncwithcurrencymanager for
all the controls gets executed when the event
"BindingManagerPositionChanged" fires.

The problem occurs when I set a RowFilter on the defaultview of the
table in the dataset. If the application of the RowView causes the
current record to change (because the previously displayed record didn't
match the filter criteria) then the BindingContext(...).position changes
BUT the BindingManagerPositionChanged event does NOT fire. The record
in the other controls does not change. After applying the filter I need
to click my "Next Rec" then "Prev Rec" buttons to the the controls
synced up again.

I probably can programmatically do a "next rec" and then a "prev rec"
but that won't work if the RowFilter results in only 1 record being
exposed.

So the question is this: If I apply a RowFilter to a table how do I
force the SyncWithCurrencyManager to update all the controls that are
controlled by BindingContextManager?

Thanks...



Aug 26 '06 #5
Hi Cor,

Thanks for the reply... after some more research I found out that the
Infragistics Grid control does a "lazy" sync. That is, it does not actually
sync up with the currencymanager until it is painted. Because the grid was
on a separate tab, and not visible, it didn't sync up, which is why when I
tried to grab a field it was from the previously pointed to record. So what
I had to do is determine the row I needed manually, and not depend on the
grid being synced up.

Funny how everything becomes clear once you realize what is going on!

Thanks, John

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
John,

That is in my idea why you can create New dataviews

With a New dataview you normally use its own currencymanager
With just declaring a dataview, you set a pointer to an old one (the
defaultview).

This is why you can create seperate dataviews, every datatable contains
already a dataview which is the property defaultview.

I hope that this answers slightly your question.

Cor

"JohnR" <Jo******@hotmail.comschreef in bericht
news:ulIHg.41$Xl5.20@trnddc06...
>Hi Cor,

Yes, Paul is correct. SyncWithCurrencyManager is an Infragistics
property. It determines if you wish the control to 'sync' with the
currencymanager or not. However, the basic problem is the same. The
question is whether it is a microsoft behavior or a behavior specific to
the Infragistic control... so let me rephrase the question and see if
anybody can shed some light on the issue...

Assuming you have multiple controls that are updated with the same
currencymanager, if you change the current record by, lets say,
incrementing the bindingmanager.position property then ALL the controls
point to the same new record. I suspect, but can't prove, that this is a
reaction to the BindingManagerBase.PositionChanged event firing.
However if you change the current record by virture of applying a
RowFilter to the DataView then what I'm seeing is that only the control
that has focus when the DataView.RowFilter was applied gets changed. The
other controls still point to the original record. I believe this is
happening because, if the record changes because you changed the
RowFilter, the BindingManagerBase.PositionChanged event does NOT fire
(that I verified), and, hence, the other controls never get notified to
update their current record.

My user interface is a tabbed display with one tab having the individual
fields displayed for the 'current' record. The other tab is an
Infragistics grid that has a row for each record in the database. By
choosing a row (in the grid row view tab) or buy clicking Prev Rec or
Next Rec on the main tab display everything works fine. The only issue
is that if you are on the main tab and set a rowfilter, the data on the
main tab changes properly, but the datagrid on the other tab does not.

I will also post this to the Infragistics site and see if anybody there
can tell me if it's a Infragistics issue or not.

Thanks, John

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:eQ**************@TK2MSFTNGP03.phx.gbl...
>>John,

I have searched on internet (Google and MSDN's) for
SyncWithCurrencyManager and got one message.

However can you explain to us what property or whatever this is?

Cor

"JohnR" <Jo******@hotmail.comschreef in bericht
news:9TEHg.10$XD1.5@trnddc01...
I have multiple controls set to the same database and, normally, when I
change the record in one control the position is also changed in the
other controls because I have "syncwithcurrencymanager' set to true for
all the controls. I'm assuming that actual syncwithcurrencymanager for
all the controls gets executed when the event
"BindingManagerPositionChanged" fires.

The problem occurs when I set a RowFilter on the defaultview of the
table in the dataset. If the application of the RowView causes the
current record to change (because the previously displayed record
didn't match the filter criteria) then the BindingContext(...).position
changes BUT the BindingManagerPositionChanged event does NOT fire. The
record in the other controls does not change. After applying the
filter I need to click my "Next Rec" then "Prev Rec" buttons to the the
controls synced up again.

I probably can programmatically do a "next rec" and then a "prev rec"
but that won't work if the RowFilter results in only 1 record being
exposed.

So the question is this: If I apply a RowFilter to a table how do I
force the SyncWithCurrencyManager to update all the controls that are
controlled by BindingContextManager?

Thanks...



Aug 26 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Daniel Kay | last post: by
4 posts views Thread by John Lafrowda | last post: by
3 posts views Thread by Thunder | last post: by
1 post views Thread by =?Utf-8?B?QnJ5YW4=?= | last post: by
3 posts views Thread by Andy_Khosravi | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.