I tried to find out from experiments and from reading the docs on how to do this but I can't seem to get it to work. Anyone knows how I can get the UltraWebGrid to automatically select the first row if there is no row already active? Thanks for any help.
rensrichmond,
I don't know what version you are using but try this:
ultrawebgrid.Rows(int_Row_Index).Activate()
In your case you would set int_Row_Index = 0
Patrick
Patrick: Thanks for your reply... I got it to work with this code in OnLoad before I saw your reply:
if (grid.DisplayLayout.SelectedRows.Count == 0 && grid.Rows.Count > 0) { grid.DisplayLayout.SelectedRows.Add(grid.Rows[0]); grid.DisplayLayout.ActiveRow = grid.Rows[0]; }
Thank you. This post was really helpful.
Regarding:
if (grid.DisplayLayout.SelectedRows.Count == 0 && grid.Rows.Count > 0) { grid.DisplayLayout.SelectedRows.Add(grid.Rows[0]); grid.DisplayLayout.ActiveRow = grid.Rows[0];}
Thanks for putting these two lines of code. They just saved me a ton of work and more lines of code than I want to have.