如何在博客文章中使用图片创建文章列表

您好,我正在尝试创建类似类别的帖子列表,但是我没有获得如何使用图像和以下描述创建列表的列表-

我尝试创建,但是数据格式不正确,您可以在下面的屏幕截图中看到-

如何在博客文章中使用图片创建文章列表

qq11479366 回答:如何在博客文章中使用图片创建文章列表

private void dataGridView_CellValueChanged(object sender,DataGridViewCellEventArgs e)
{
  var grid = (DataGridView)sender;
  if (grid.Columns[e.ColumnIndex] is DataGridViewButtonColumn)
  {
    if (grid.RowCount >= 0)
    {
       //this needs to be altered for every DataGridViewButtonColumn with different Text
       grid.Rows[grid.RowCount - 1].Cells[e.ColumnIndex].Value = "ButtonText";
    }
  }
}

private void dataGridView_RowsAdded(object sender,DataGridViewRowsAddedEventArgs e)
{
  var grid = (DataGridView)sender;
  //this needs to be altered for every DataGridViewButtonColumn with different Text
  int buttonColumn = 3;
  if (grid.Columns[buttonColumn] is DataGridViewButtonColumn)
  {
    if (grid.RowCount >= 0)
    {
        grid.Rows[grid.RowCount - 1].Cells[buttonColumn].Value = "ButtonText";
    }
  }
}

本文链接:https://www.f2er.com/2824251.html

大家都在问