Gridview rowdatabound event in winforms?

in asp.net, we can handle the RowDataBound event of the GridView control. This event fires when each row is added to the gridview.

I want to be able to handle this event in gridview in a winforms application, but I cannot find a similar event. my question is: what is the name of the event that allows me to do the same as the RowDataBound in asp.net?

+3
source share
2 answers

There is no such event handling in DataGridView as in ASP.NET.

, RowsAdded, , . :

private void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
{
    for (int i = e.RowIndex; i < e.RowCount + e.RowIndex; i++)
    {
        Console.WriteLine("Row " + i.ToString() + " added");
    }
}

, "" - , , , - , .

, , ( ), ASPX , CellFormatting - , .

+3

RowDataBound WinForms DataGridView. , CellFormatting DataGridView.

0

Source: https://habr.com/ru/post/1779830/


All Articles