Populate Comboboxwith dependency of code product


Author
Message
Rafael
Rafael
StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)
Group: Forum Members
Posts: 48, Visits: 216
I tried to use the code below
private void prj_cod_Leave(object sender, EventArgs e)

{

sysProjetoEquipamentoBO1.FillDataTable("SELECT * FROM tabproj_equipamento WHERE prj_nrow = " + sysProjetoBO1.prj_nrow);

}

but he did not give certain. I have a field sysProjetoBO1.prj_cod and sysProjetoBO1.prj_nrow in the same table. I need to show prj_cod and populate combobox for the code sysProjetoBO1.prj_nrow. Combobox populated is sysProjetoEquipamentoBO1.prj_nrow!

Dustin Taylor
Dustin Taylor
StrataFrame Team Member (938 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
I'm not sure I understand the question... but I'll give it a shot Wink.



Are you trying to pull back all the records that match the selected value of your combo box?



MyBO.FillDataTable("SELECT * FROM Table WHERE code_product = " & cbo_Product.SelectedValue)


(I wouldn't recommend hard coding it in the FillDataTable like that, but it gives you a start)



Or are you trying to populate the combo box itself with all the records associated with a given code? If so, then just add a fill method to your BO that corresponds to your select statement, and call that method in your combo's PopulationDataSourceSettings.
Rafael
Rafael
StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)
Group: Forum Members
Posts: 48, Visits: 216
How population combobox with dependency of code product.

Select * from Produto where code_product = textbox_code_product

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search