Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
XamDataGrid Scrolling
posted

 

I have written this function to preselect a  Country in Data Grid, and it works, but the Data Grid does not automatically scrolls to the selected record. Can somebody help and tell me which Method or Property can handle this.

 

public void preSelectRecord() {
            DataRecord records;
            for (int i = 0; i < dataGridCountry.Records.Count; i++)
            {
                records = (DataRecord)dataGridCountry.Records[i];
                if (records.Cells[1].Value.ToString() == "US")
                {
                    records.IsSelected = true;
                    records.IsActive = true;
                 }

            }
        }

Regards Arta!