N 行と 9 列があり、画像をクリックした後にのみ 2 つの列が表示されます。しかし、各行について、その列にテキストがある場合にのみ画像が表示されるようにします。私を助けてください。
<asp:BoundField DataField="Notes" HeaderText="Notes" Visible="False"
SortExpression="Notes" />
<asp:BoundField DataField="Notes" HeaderText="Notes" Visible="False"
SortExpression="Notes" />
<asp:ButtonField ButtonType="Image" ImageUrl="~/Images/Imgs.jpg"
Text="Button" />
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
GridView1.Columns[2].Visible = true;
GridView1.Columns[3].Visible = true;
}