PC Review


Reply
Thread Tools Rate Thread

Events Capturing in Untyped Dataset

 
 
=?Utf-8?B?V29vIE11biBGb29uZw==?=
Guest
Posts: n/a
 
      7th Sep 2005
Hi,
Hope somebody can help me with this.

I have a Dataset and BindingManagerBase declared :-
********************************************
Private dsData As DataSet
Private bmData As BindingManagerBase
********************************************

The dsData is fill by an oledbadapter upon the form load:-
******************************************
strSQL = "SELECT * FROM tblWarehouse"
dbAdapter.SelectCommand = New OleDbCommand(strSQL ,cn)
dsData = New DataSet
dbAdapter.Fill(dsData, "tblWarehouse")
******************************************

Subsequently, I have my form's controls bound to the dataset:-
*******************************************************
txtWhseID.DataBindings.Add("Text", dsData, "tblWarehouse.strWarehouseID")
cboWhseType.DataBindings.Add("Text", dsData, "tblWarehouse.strType")
bmData = Me.BindingContext(dsData, "tblWarehouse")
*******************************************************

Currently, I can navigate the dataset by manipulate the bmData:-
************************************************
bmData.Position = 0 '(Go to First Record)
bmData.Position -= 1 '(Go to Previous Record)
************************************************

Now, I would like to add in the record indicator into my Form:- Record 3 of 10

The easiest way, is to capture the event when the dataset move from one
record to another or when a record in the dataset is deleted or added.
Example :
Private Sub dsData_Move()
' Calculate the current record position and update result to form display
end sub


Anyone help ?






 
Reply With Quote
 
 
 
 
olrt
Guest
Posts: n/a
 
      7th Sep 2005
Please see the following article :

http://msdn.microsoft.com/library/de...angedtopic.asp

It demonstrates how one can interception the BindingManagerBase's
PositionChanged
event.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft Dot NET Framework 3 31st Oct 2003 02:05 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ADO .NET 2 31st Oct 2003 02:05 PM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft Dot NET Framework 2 31st Oct 2003 03:39 AM
how to use merge with a typed dataset and untyped dataset vipin kumar Microsoft ADO .NET 0 1st Oct 2003 02:21 PM
Re: Merging untyped dataset into a typed dataset (GUID problems) Lewis Edward Moten III Microsoft ADO .NET 0 14th Jul 2003 09:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:45 PM.