Hi,
I need to fill datagridview combobox column(Package) by stores procedure. The parameter value for the SP will be taken from previous column (Product).
once the product column is selected then the packing should be loaded as per the stores procedure and once packing has selected "unitbuy" has to be shown as rate.
I have created datagirdview combo box column
Dim Combopkg As New DataGridViewComboBoxColumn
With Combopkg
.HeaderText = "Package"
.DataPropertyName = "PackID"
.datasour=????
.DisplayMember = "PKG"
.ValueMember = "ID"
.Name = "PackID"
.Width = 75
End With
I dont know how to give datasource..
my stores procedure, which i already created in sql as follows,
Create proc [dbo].[spPkgBuy]
@PDT int
as
Begin
select ID,PKG,UnitBuy from vpkg where PDTID=@PDT
end
So if the value of DGV cells("Product") has changed then stores procedure should work for next colum. Packing of particular product id will be loaded. The stores procedure is designed like that. Once package has selected then unitbuy value from store procedure should filled in DGV.cells("Rate") but it should not be read only. After filling rate column also, i can edit it.
I have posted
same question in msdn [
^]but no reply has got..
Please help me..
thanks