Tag: datagridviewbuttoncolumn

有时我想隐藏DataGridViewButtonColumn中的按钮

我有一个DataGridView ,它是上一个问题( 链接 )的主题。 但有时Button是null 。 这可以。 但是如果它是null,有没有办法可以选择删除/添加(显示/隐藏?)按钮到按钮的DataGridViewButtonColumn 像这样: +————+————+ | MyText | MyButton | +————+————+ | “do this” | (Yes) | | “do that” | (Yes) | | FYI ‘blah’ | | <—- this is where I optionally want no button | "do other" | (Yes) | +————+————+ 这是我到目前为止所尝试的( 基于此示例 ) private void grdVerdict_CellFormat(object […]