I found the following event that I want to use in my asp.net app.
private void grid_SortCompare(object sender, DataGridViewSortCompareEventArgs e)
{
try
{
if (e.RowIndex1 == this.dataGridView1.Rows.Count -1)
e.Handled = true;
if (e.RowIndex2 == this.dataGridView1.Rows.Count - 1)
e.Handled = true;
return;
}
catch (Exception ex)
{
ex.ToString();
}
}
Basically it checks to see if it is the last row and if it is it does not sort. Hence sorting all rows besides the last one.
How can I implement this into my asp.net page in which I have a GridView. This event was written for C# desktop apps and I cannot seem to find the equivalent for asp.net
Thanks!