Show / Hide Table of Contents

    DataStoreExtensions.GetNextModified(int row, DwBuffer dwbuffer) Method

    .NET Standard 2.x

    Reports the next row that has been modified in the specified buffer.

    Namespace: PowerScript.Bridge

    Assembly: PowerScript.Bridge.dll

    Syntax

    public static int GetNextModified(this IDataStoreBase dataStore, int row, DwBuffer dwbuffer);
    

    Parameters

    row System.Int32

    A value identifying the row location after which you want to locate the modified row. To search from the beginning, specify -1.

    dwBuffer DwNet.Data.DwBuffer

    A value of the DwBuffer enumerated datatype identifying the DataStore buffer in which you want to locate the modified row.

    Returns

    System.Int32

    Returns the number of the first row that was modified after row in dwbuffer in dwcontrol. Returns -1 if there are no modified rows after the specified row.

    Examples

    The following code example demonstrates how to use the GetNextModified method to get the row number of the modified row in the primary buffer.

    using System;
    using DWNet.Data;
    using PowerScript.Bridge;
    
    namespace Appeon.ApiDoc.DataStoreExtensionsExamples
    {
        public class GetNextModifiedExample
        {
            private readonly SchoolContext _context;
    
            public GetNextModifiedExample(SchoolContext dataContext)
            {
                // Sets the data context
                _context = dataContext;
            }
    
            public void Example()
            {
                // Instantiates a DataStore object with datawindow: d_department.
                var datastore = new DataStore("d_department", _context);
                datastore.Retrieve();
    
                // Modifies the data of 2nd column in 2nd row
                datastore.SetItem(1, 1, "department name");
    
                // Gets the row number of the modified row in the DataStore.
                int row = datastore.GetNextModified(-1, DwBuffer.Primary);
    
                Console.WriteLine($"row={row}");
    
                /*This code produces the following output:
                
                row=1           
                */
            }
        }
    }
    

    Example Refer To

    Model Class: D_Department
    DataWindow File: d_department

    Applies to

    .NET Standard

    2.x

    Back to top Generated by Appeon