Retrieving Data From a Datagrid Row That Isn’t Current

Retrieving Data From a Datagrid Row That Isn’t Current

When you change the row in the data control that a Sheridan DataGridis bound to, the DataGrid will also reposition its current row. To avoidthis, 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 currentrow 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 
See also  5 Strategies for Supercharging Your CRM

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist