BrightIdeasSoftware.DataSourceAdapter.ChangePosition C# (CSharp) Method

ChangePosition() protected method

Change the control's position (which is it's currently selected row) to the n'th row in the dataset
protected ChangePosition ( int index ) : void
index int The index of the row to be selected
return void
        protected virtual void ChangePosition(int index)
        {
            // We can't use the index directly, since our listview may be sorted
            this.ListView.SelectedObject = this.CurrencyManager.List[index];

            // THINK: Do we always want to bring it into view?
            if (this.ListView.SelectedIndices.Count > 0)
                this.ListView.EnsureVisible(this.ListView.SelectedIndices[0]);
        }