Check less-then function from jQuery[
^]
There is also pseudo-selector in CSS:
You would use it like this (for full row select) in your CSS file:
your-grid-selector tr:lt(3) { font-weight: bold; }
if you need only one column then add :nth-child(column-index) to the selector above.
your-grid-selector tr:lt(3):nth-child(1){ font-weight: bold; }
If you absolutely have to have it server side (bad idea):
Check this event[
^]
Note that this will change only second column, for the whole row you have to remove Cells part of the line :)
protected void grdOlymp_DataBindingComplete (object sender, DataGridViewBindingCompleteEventArgse)
{
for (int i=0; i <= 2; i++)
grdOlymp.Rows[i].Cells[1].Font.Bold = true;
}
If this helps, please take time to accept the solution so that others may find it. Thank you.