When i fill a data grid with some rows from a database, one of the row appears to be selected but when I check there is nothing selected and the ActiveCell and ActiveRow are both null. How can I clear the appearance that something is selected?
Hello,
yea... just set the ActiveRow = null after you set the DataSource and all will be as you expect. Even though it is null, here you need to explicitly set the ActiveRow to null to achieve the desired results.
That doesn't seem to help me...The first row is still appearing as though it's selected, but it's not. I even set the ActiveCell to null.
dt.DefaultView.RowFilter = rowFilter;
ultraGrid1.ActiveCell = null;
lblSelections.Text = ultraGrid1.Selected.Rows.Count.ToString() + " selected of " + dt.DefaultView.Count.ToString() + " displayed of " + dt.Rows.Count.ToString() + " total.";