0

リストから入力されたDataGridViewがあります。column次に、最後columnにリンクを定義しましたが、条件が満たされた場合にこのリンクテキストを削除するにはどうすればよいですかDataBoundView私は以下を持っています:

        dgvReport.AutoGenerateColumns = false;
        dgvReport.DataSource = queries;

        //locals 
        Int32 lastColumnIndex = this.dgvReport.Columns.Count - 1;

        //hide reads links for the null queries
        for (int i=0; i < queries.Count; i++) {
            if (queries[i].SomeID == null || queries[i].AnotherID == null) {
                this.dgvReport.Rows[i].Cells[lastColumnIndex].Value = "";
            }
        }

これは機能せず、列のテキストにはまだが表示されますView。何か案は?

編集:lastColumnIndexは24で、これは実際に最後の列インデックスです

4

1 に答える 1