【问题标题】:c# winform datagridview cell click to TabControl Pagec# winform datagridview 单元格点击到 TabControl 页面
【发布时间】:2015-11-08 13:32:08
【问题描述】:

我想实现一个功能,可以

点击 datagridview 的单元格/列而不是切换到标签页

有什么想法吗?

喜欢这些图片

pic one is the total result on Tab 1 and Tab2, when i click on cell/column

switch to Tab1 or Tab2 to see the details

【问题讨论】:

    标签: c# winforms datagridview tabs datagridviewcolumn


    【解决方案1】:
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            // check if you are clicking on needed column
            // and focus the tab
            if (e.ColumnIndex == 1) tabControl1.SelectedTab = tabPage2;
        }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-09-27
      • 2015-09-25
      • 2021-10-04
      • 2021-02-07
      • 1970-01-01
      • 2023-03-29
      • 2013-06-18
      • 1970-01-01
      相关资源
      最近更新 更多