Beispiel #1
0
        private void SetCurrentRow(int index)
        {
            if (index >= 0 && index < Rows.Count)
            {
                if (m_currentRowIndex >= 0 && m_currentRowIndex < Rows.Count)
                {
                    ((DataGridViewCustomRow)Rows[m_currentRowIndex]).current = false;
                }
                if (m_results.Length > 0)
                {
                    ((DataGridViewCustomRow)Rows[index]).current = true;
                    m_core.SetCurrent(index);
                }
                else
                {
                    m_core.SetCurrent(-1);
                }
                m_currentRowIndex = index;

                if (m_firstSelectedRowIndex >= Rows.Count)
                {
                    m_firstSelectedRowIndex = m_currentRowIndex;
                }

                if (m_makeAction)
                {
                    for (int col = 0; col < Rows[index].Cells.Count; col++)
                    {
                        if (Rows[index].Cells[col].Visible)
                        {
                            CurrentCell = Rows[index].Cells[col];
                            break;
                        }
                    }
                }
                m_mainSplitContainer.CurrentResultChanged();
            }
        }