Populating Gridview with no selected record

Asked

Viewed 42 times

0

I’m populating a Gridview and he’s populating with the first record ever selected.

var lstUsurios = new V_ENTIDADE_X_PWDNegocio().Listar();

gdvAcesso.DataSource = lstUsurios; 

gdvAcesso.DataBind();

I’ve tried to change some of his properties and nothing...

How could I get around this situation?

1 answer

0

I don’t know if I can prevent the Grid to make the selection, but to clear it is very easy:

gdvAcesso.SelectedIndex = -1;
  • on the Web Form as well ?

  • Oops, I mistook it for Winforms. Look at my edited answer

Browser other questions tagged

You are not signed in. Login or sign up in order to post.