Hi all,

I am able to set focus on a row in a gird view when it the row is clicked. But when I sort the grid view, the focus does not move with the sorted row. This what I am doing

protected void ASPxGridView1_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
{

ASPxGridView1.SettingsBehavior.AllowFocusedRow = true;
int visibleRow;
if (int.TryParse(e.Parameters, out visibleRow))
{
System.Data.DataRow row = ((ASPxGridView)sender).GetDataRow(visibleRow);
if (row != null)
{
int id = Convert.ToInt32(row[colNameInjectionId]);

ASPxGridView1.FocusedRowIndex = visibleRow;
}
}

}

Can any one please help.