I have an AspxGridView in my project with AllowFocusedRow="True"
. Every time I load the page (with the table) the first row is focused. When I assign -1 to gvMain.FocusedRowIndex on server side (before the page loading) it doesn't help. But when I change the focused row index on client side:
Init="function() {
gvMain.SetFocusedRowIndex(-1);
then it loads the table with first row selected which then disappears. So I guess it is better to define it earlier. But how?
The solution was the PreRender event:
protected void ASPxGridView1_PreRender(object sender, EventArgs e) {
if(!IsPostBack)
ASPxGridView1.FocusedRowIndex = -1;
}