473,729 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CurrencyManager Refresh After New DataRow

Hi,

Please can anyone kindly offer some suggestions as to why the
CurrencyManager might not refresh.

I am using the CurrencyManager to navigate through a DataView. I am aware
that there is an issue when adding a new record with using bound CheckBoxes
('http://support.microso ft.com/default.aspx?sc id=kb;en-us;326440'). Due to
this problem, I have decided to drop the DataBindings from my controls, clear
the values, and attempt to re-bind them after adding a new record.

Unfortunately, after doing so, the CurrencyManager fails to acknowledge that
the new record exists within the DataView( DataTable).

Is there an issue with using a DataView with the CurrencyManager ?
Apr 18 '06 #1
3 4409
Have you refreshed the currencymanager ?

--
James Jenkins
http://www.tamarsolutions.co.uk
"Brian Richardson" <Br************ *@discussions.m icrosoft.com> wrote in
message news:6C******** *************** ***********@mic rosoft.com...
Hi,

Please can anyone kindly offer some suggestions as to why the
CurrencyManager might not refresh.

I am using the CurrencyManager to navigate through a DataView. I am aware
that there is an issue when adding a new record with using bound
CheckBoxes
('http://support.microso ft.com/default.aspx?sc id=kb;en-us;326440'). Due
to
this problem, I have decided to drop the DataBindings from my controls,
clear
the values, and attempt to re-bind them after adding a new record.

Unfortunately, after doing so, the CurrencyManager fails to acknowledge
that
the new record exists within the DataView( DataTable).

Is there an issue with using a DataView with the CurrencyManager ?

Apr 18 '06 #2
Yes I have. The record exists within the DataTable. There is however a
Primary Key on the DataTable, and quite obviously the value is set to NULL
for the new record. I assume this would not be the cause of my problem?

"ja***@tamarsol utions.co.uk" wrote:
Have you refreshed the currencymanager ?

--
James Jenkins
http://www.tamarsolutions.co.uk
"Brian Richardson" <Br************ *@discussions.m icrosoft.com> wrote in
message news:6C******** *************** ***********@mic rosoft.com...
Hi,

Please can anyone kindly offer some suggestions as to why the
CurrencyManager might not refresh.

I am using the CurrencyManager to navigate through a DataView. I am aware
that there is an issue when adding a new record with using bound
CheckBoxes
('http://support.microso ft.com/default.aspx?sc id=kb;en-us;326440'). Due
to
this problem, I have decided to drop the DataBindings from my controls,
clear
the values, and attempt to re-bind them after adding a new record.

Unfortunately, after doing so, the CurrencyManager fails to acknowledge
that
the new record exists within the DataView( DataTable).

Is there an issue with using a DataView with the CurrencyManager ?


Apr 20 '06 #3
I have managed to determine the cause of my troubles.

It is purely due to some of the 3rd party controls we are using. When I
attempt to add a new record, it is added, but the CurrencyManager failed to
position change to the new record because some of the 3rd party controls
behave in a similar fashion to the CheckBox.

"Brian Richardson" wrote:
Yes I have. The record exists within the DataTable. There is however a
Primary Key on the DataTable, and quite obviously the value is set to NULL
for the new record. I assume this would not be the cause of my problem?

"ja***@tamarsol utions.co.uk" wrote:
Have you refreshed the currencymanager ?

--
James Jenkins
http://www.tamarsolutions.co.uk
"Brian Richardson" <Br************ *@discussions.m icrosoft.com> wrote in
message news:6C******** *************** ***********@mic rosoft.com...
Hi,

Please can anyone kindly offer some suggestions as to why the
CurrencyManager might not refresh.

I am using the CurrencyManager to navigate through a DataView. I am aware
that there is an issue when adding a new record with using bound
CheckBoxes
('http://support.microso ft.com/default.aspx?sc id=kb;en-us;326440'). Due
to
this problem, I have decided to drop the DataBindings from my controls,
clear
the values, and attempt to re-bind them after adding a new record.

Unfortunately, after doing so, the CurrencyManager fails to acknowledge
that
the new record exists within the DataView( DataTable).

Is there an issue with using a DataView with the CurrencyManager ?


Apr 20 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2812
by: Kris Bethea via DotNetMonster.com | last post by:
Greetings, I have a VB.NET program that I am trying to convert to C# (my office decided that we are going to use C# from now on). I've only been working with C# for about a month now, so this has been quite the learning experience for me. The following code is from my VB.NET program and it selects the Call Number from my datagrid and then uses that information to populate another form.
2
7813
by: web1110 | last post by:
I created a class derived from a DataGridTextBoxColumn. I have it working through looking at various examples on the net. To update the underlying DataGrid, I had to overload the Edit method which provided the CurrencyManager and row number required for SetColumnAtRow method. My question is, exactly is the CurrencyManager? I've used it, but I don't understand it.
5
1494
by: Christopher Weaver | last post by:
I have a CM bound to a table like this: cMgrSort = (CurrencyManager)this.BindingContext; Under certain circumstances I need to find a specific row in that table DataRow r = dsSortOrders.Tables.Rows.Find(SortOrder); When that happens, I need the CM.Position to reflect that row so that everything stays in sync. How can I ensure that this happens?
10
1879
by: D | last post by:
hi I have a form with 2 datagrids showing related table data in a master / child or order / order details type relationship. I would like to auto select the row in the order details table which contains the highest priced item. My thoughts were to get the currency manager from the orderdetails table and iterate thru each row and keep track of the highest item and row and select that when done. I have found that for some reason the...
7
15441
by: Juan Romero | last post by:
Hey guys, please HELP I am going nuts with the datagrid control. I cannot get the damn control to refresh. I am using soap to get information from a web service. I have an XML writer output the file to a folder, and then I read it back into the dataset using the dataset1.readxml. Up to this point, everything works wonderfully. The query executes, the dataset gets populated, and I get the results displayed in the datagrid.
0
9694
by: thomasp | last post by:
This is a two part question, 1) The code below should display a form with a datagridview and a few command buttons. This form should allow the user to make change to the records displayed in the datagridview and have to changes written to the Filters table in an MS Access database. The if the user chooses, clicking on the Restore button empties the contents of the Filters table, refills it with the contents of the DefaulFilters...
2
11479
by: Rich | last post by:
Hello, Following an example at http://www.vb-tips.com/dbpages.aspx?IA=DG (by Cor Lightert and Ken Tucker) on binding a dataRelation to a Datagridview for sqlClient, I was able to view rows in datagridview2 that corresponded to a selected row in datagridview1. Great article/example.
5
2088
by: hartley_aaron | last post by:
Hi, CurrencyManger has a method called AddNew which well create a new record in the data that it is bound to (ie a new datarow in a table). The new record has null values for all of its elements. What I would like to have is the ability to add a new record using the current values of the TextBox fields that have been bound to the datasource. I have tried various solutions to have the code edit the record using the current values...
6
50465
by: George | last post by:
Hi, I have been encountering a refresh problem with DataGridView, which is bound to a DataTable. When I make updates (Add, Delete, update) to the DataGridView, everything flow nicely to DataTable. No problem here. However, when I add data (programatically) to the DataTable, the DataGridView does not refresh right away. If I minimize and show my form,
0
8917
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8761
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8148
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2163
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.