473,738 Members | 4,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Another question!! refresh objects that are data bound

hcs
Hello,

on a datagrid when you alter the dataset and want to show the new dataset
you use datagrid.refres h().
how is this possible on a form which is based on a dataset and consists of a
number of textboxes and comboboxes? i have just tried .refesh on the
textboxes but it is not displaying the dataset. as a test i have placed a
datagrid is bound to the same dataset and it displays perfectly the updated
dataset though none of the other controls do. any ideas?

Cheers
Nov 21 '05 #1
1 1405

Jan. 6, 2005

You would have to use the CurrencyManager . Then you would have to
bind the textboxes, etc. to the dataset using databindings. Then you would
have to set the Current or Position (I can't recall right now.) property of
the CurrencyManager to the row you want. This will update all of the bound
controls. When you set the datasource and datamembers of the textboxes you
will have to specify the same combination in the constructor of the
CurrencyManager . If this reply helps you, then please click on the "Yes"
button above this message where the question asks "Was this post helpful to
you?". Also in the future, if you mark your new posts as a question when you
click on New, then you will be able to credit the person who answers your
questions. I hope this helps and have a great day!

Joseph MCAD
"hcs" wrote:
Hello,

on a datagrid when you alter the dataset and want to show the new dataset
you use datagrid.refres h().
how is this possible on a form which is based on a dataset and consists of a
number of textboxes and comboboxes? i have just tried .refesh on the
textboxes but it is not displaying the dataset. as a test i have placed a
datagrid is bound to the same dataset and it displays perfectly the updated
dataset though none of the other controls do. any ideas?

Cheers

Nov 21 '05 #2

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

Similar topics

2
9594
by: bds | last post by:
I'm new to .net 2.0 and I'm trying to figure out the best way to create a form that has a couple of controls and one of the controls is a combo box with a data bound list of items from another table. To understand the problem more, consider using the AdventureWorks2000 database. I want a simple form that shows FirstName, LastName, and Shift. Instead of the ShiftID, I want the shift name from the Shift table to be displayed. Here's...
0
1104
by: Dwayne Gaddy | last post by:
Hey all, I have a windows form with a list boxes. I have data bound the list boxes with data from my sql database. I want to use drag and drop to allow users to choose different options from the list boxes on the form and drag them into another empty list box that is not bound to any data when the form loads. I was wondering is it possible to use drag and drop with data bound list boxes ? If it is possible do you know of any place on...
1
1948
by: Bill | last post by:
I have five users using the same forms to enter and retrieve data from an Access database held on a server but the only way each user can see any changes to records is by closing and reopening the database Ive created a refresh button on each form to refresh the data but still no luck, I think it failed because it's over a network but not sure - can somebody provide me with the code that I add to the refresh button. Thanks, Bill
5
2184
by: yma | last post by:
Hello, I tried to display a column in MS Access 2000 nwind.mdb using 3 data controls. But I got "It is already opened exclusively by another user, or you need permission to view its data." I put ole DataAdapter, Connection and dataset controls and fill in the properties of the listbox. The only code I have is OleDbDataAdapter1.Fill(DataSet11, "employees") in page_load sub.
1
3040
by: Spock | last post by:
Hi. I have a form with a listbox and a few label fields all bound to a dataset. When i navigate the listbox the labels change accordingly. so far everything works good. I made a button to delete a record. I delete the row from the datatable and update the database with the adapter and that all works good. The record is removed from the listbox. Here is my problem.
4
2674
by: Evan | last post by:
I have a data bound combo box. The combo box displays several items (status code descriptions). After the combo box is bound, I want to set the combo box so that the "Draft" status is displayed by default. Since the data originally comes from a database I don't know which position in the combo box it will be and I don't want to hardcode the status_code field (I want to select the combo box item based upon status_desc). ...
3
4962
by: Furty | last post by:
Hi, I'm looking for the best practice for creating a generic data validation implementation for my data bound business objects. I currently have a business object base class implementing the following interfaces: IEditableObject, ICloneable, INotifyPropertyChanged, and IDataErrorInfo More specifically, my IDataErrorInfo implementation is like so:
7
1888
by: Computer Guru | last post by:
Hi, Pardon the unclear/verbose subject, I just can't think of another way of phrasing it. Basically, I can assign the (for instance) "Location" property of a picture box to a data-bound item. Like, I can get the absoloute location from an ADO.NET database, and assign it to the PictureBox.Location property.
3
1646
by: cr113 | last post by:
I'm trying to convert a windows app to ASP.NET using VS2005. I have some web experience, but not much. 99% of the time if I need to display data in a table in my windows apps I use a ListView object and populate it manually using code like this: ListView1.Items.Add("Jones") ListView1.Items(ListView1.Items.Count - 1).SubItems.Add("123") The result of this code would be a row added to the ListView like this:
0
8969
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
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9263
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
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3279
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
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.