Add new row to a Gridview Devexpress with data from a SQL query

3

The mechanics is the following, I click on a button and I bring some data to my BD, some of these I must add them to a grid but as a new row is to say that I can read other button and I keep adding.

It is a menu and the product is selected, data such as the name, price and quantity must be loaded in the grid, I have tried in many ways but it does not give me, please someone who helps me ......: (

    
asked by avargasma 11.05.2016 в 17:54
source

1 answer

2

To add rows to the gridview, you only have to create a DataTable loaded from the database and assign it to the DataSource property of the grid

Dim tabla as DataTable
tabla = DB.GetDataTable("select..")
grid.DataSource = tabla
grid.DataBind()

If you can put more information on how you are getting data from the bd it would be better

    
answered by 12.05.2016 в 10:23