Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Intermediate
Aug 20, 1997

Retrieving Data From a Datagrid Row That Isn't Current

When you change the row in the data control that a Sheridan DataGrid is bound to, the DataGrid will also reposition its current row. To avoid this, use the Clone method to make a copy of the dynaset in the data control. Then, accessing the rows in the cloned dynaset will not affect the current row in the DataGrid. Here's an example:
 Dim DynClone As Dynaset 
Set DynClone = Data1.Recordset.Clone() 
'clone the data control's dynaset 
DynClone.MoveFirst 
Do While Not DynClone.EOF() 
...perform operation on the current _ 
row of DynClone... 
DynClone.MoveNext 
Loop 
Sheridan Software
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date