473,385 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Refreshing bind info in controls

Hi

I have a form with few labels and textboxes with databind to a certain dataset
I want to be able to search the dataset for a specific record and once I find it, refresh the information in my controls according to the current row

Currently, in my labels and textboxes, i see the first ro data all the time
is there a "refresh" cmmand or a referral command for the binding to the current row

Thanks
Ori
Nov 20 '05 #1
2 836
This involves using a currency manager, which you can get from doing

Dim cm as CurrencyManager

cm = me.BindingContext(myDataSource)

you can set the Position property to update all the bindings... by switching
the position, it will raise the ListChanged event which will notify your
bindings to refresh there values.

find only creates a reference to the found row, it does not move the
position. The other option to currency manager is to use a DataView. In
which case you can filter down to a single record of a dataset without
modifying the dataset data itself.

hth,

"Ori :)" <an*******@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...
Hi !

I have a form with few labels and textboxes with databind to a certain dataset. I want to be able to search the dataset for a specific record and once I find it, refresh the information in my controls according to the current
row.
Currently, in my labels and textboxes, i see the first ro data all the time. is there a "refresh" cmmand or a referral command for the binding to the current row ?
Thanks !
Ori

Nov 20 '05 #2
Thanks for your advice CJ, I implemented it in the following way

Dim CurrentPos As Integer =
Dim DRSite As DataRo
For Each DRSite In DsExpSite.Tables("SITE").Row
If DRSite("site_name") = "Chicago" Then Exit Fo
CurrentPos = CurrentPos +
Nex
Dim cm As CurrencyManage
cm = Me.BindingContext(DsExpSite, "SITE"
Me.BindingContext(DsExpSite, "SITE").Position = CurrentPo

It works great, is this the optimal solution for me ?
Nov 20 '05 #3

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

Similar topics

5
by: Chris | last post by:
Greetings, I'm trying to late bind a ActiveX DLL that was made with VB6 in C#. Can you give me an example or URL of this? I've been trying to google it, just cant find a straight answer. Thanks!
5
by: Jeff | last post by:
IDE: VS 2003 :NET OS: XP Pro My app have a form with a tab-control on it. The tab-control have 2 tabpages. One of the tabpages displays a datagrid, and the other tabpage displays details (order...
1
by: Robert Clark | last post by:
This a pocket pc/smartphone questions mainly, but i thought i'd ask the question in the C# newsgroup. I have a form which i use to display information from a web service. From this form i open...
7
by: A.M | last post by:
Hi, I want to refresh my DataGrid data on every postback. I have following code in Page_Load event, but after first page load, the DataGrid never gets refresh. Here is the code i have in...
2
by: DevilZAngel | last post by:
Hi all I am writing a simple chat application in asp.net. Problem is that, when other user sends a message, I want my testbox (which shows the messages) to refresh automatically, without using...
1
by: Phil Townsend | last post by:
I have a page that contains one user control. There are times when I would want the web form to trigger the usercontrol to refresh--or reload itself. How can I do this? Thanks... *** Sent...
17
by: A_PK | last post by:
I have problem databinding the DataGrid with DataView/DataSet after the filter... I create the following proceudre in order for user to filter as many as they want, but the following code is only...
1
by: Simon | last post by:
Hi All, I have a DataGrid bound to a DataTable. Every once in a while I need to refresh the data in the table so that the updated data is displayed in the DataGrid. Here's how I am attempting...
5
by: JJ | last post by:
I want to have two lists (may have to be listboxes) on a page that are populated from a database. I then need to be able to click on an entry in one box and add it to the other, _preferably_...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.