Populating a datagrid using the selectedvalue of a combobox

Hi -

I'm having trouble populating a datagrid when a user selects an item. Nothing shows up in the grid and think it's because of my SQL statement joining two tables:

Const strSQL_SUPPLIER_SELECTED As String = "SELECT ProductID, ProductName, QuantityPerUnit, UnitPrice, " & _
"UnitsInStock, UnitsOnOrder, ReorderLevel, ProductDiscontinued FROM Products INNER JOIN Suppliers ON Products.SupplierID = Suppliers.SupplierID WHERE SupplierID = '"

I then have the entre SQL query as str_SQL_SUPPLIER_SELECTED & cboSuppliers.SelectedValue.ToString & "'"

When I debug it the SelectedValue is '18'. Any ideas?

Comments

  • hi,
    Try same using flexgrid or mshflexgrid.i think datagrid shows problem when you try to use run time queries .
    Ganesh :)

  • : hi,
    : Try same using flexgrid or mshflexgrid.i think datagrid shows problem when you try to use run time queries .
    : Ganesh :)
    :
    :
    Thanks! I'll try it and hope for the best... :)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories