void L_Log_SelectedIndexChanged(object sender, EventArgs e) { //int index = L_Log.SelectedIndex; //if (index < 0) return; String line = L_Log.SelectedItem as String; if (line == null) { return; } String numStr = line.Split(":(".ToCharArray())[1]; int num; if (int.TryParse(numStr, out num)) { T_From.Text = (num - 1).ToString(); Track_From.Value = num - 1; V_Data.ReleaseSelection(); List <object> list = V_Data.GetAColumnData(1);//get line col int index = list.IndexOf(num.ToString()); if (index > 0) { V_Data.SelectRow(index - 1, true); V_Data.SelectRow(index, true); V_Data.FirstDisplayedScrollingRowIndex = index - 1; } } }