Create a Row in data GridView using data from a VB database

0

Create a row based on a row in a database

So look, I know that this is probably basic, but I SWEAR to have searched on the internet how to do this and I did not find answers. Basically what I'm looking for, is to make my program search a database for a specific Row by its id and then be printed in a datagridview

  

(For example 'I put 12321 in search and the exact result is   printed as a row in a DataGridView)

I really can not explain myself anymore because I do not have the code that I already have at hand.

In case you take your time answering my question I really appreciate it.

    
asked by Rayo Gamer 01.08.2018 в 04:19
source

1 answer

0

There are many ways to do this, my favorite way is to do it from linq, but maybe a more basic and simple one is with a databindingsource.

DataBindingSource has the filter option, and it would be as practical as writing something like this:

filtro = "[NombreColumna] = " & textoaBuscar;
BindingSource.Filter = filtro  

Here you can see an example with many options: link

I hope it serves you.

    
answered by 01.08.2018 в 06:03