Tema: Re: DataGridView .net 2.00 - How to Go to first error position
Autorius: Jornada Del Muerto
Data: 2011-01-06 18:08:37
Nu va, pats atsakysiu i savo si klausima, gal kam pravers kaip tai pdaryti.
Cia mano nuveldetam datagridview pasipilde pozicionavimo funkcijom jis:
#region Positioning
public void GoToRow (int i)
{
if (Rows.Count > i)
{
FirstDisplayedScrollingRowIndex = i;
}
}
public void GoToRow (DataGridViewRow row)
{
GoToRow (row.Index);
}
/// <summary>
///
/// </summary>
/// <returns>true if error row found, false if not</returns>
public bool GoToFirstErrorRow ()
{
foreach (DataGridViewRow row in Rows)
{
if (!string.IsNullOrEmpty (row.ErrorText))
{
GoToRow (row);
return true;
}
}
return false;
}
#endregion