Combobox in datagrid
-
Hi, Im stuck! I habe a firebird database for which I am writing a VB.net frontend. Among others I have a table named tb_tags with the following collumns: Tag;Tagtext;Tagtypeid And a Table named tb_tagtypes with the collumns: Tagtypeid;tagtypetext I am filling a datagrid with the SQL command: "SELECT a.tag, a.tagtext, b.tagtypetext FROM tb_tagtypes b join TB_tags a on b.TAGTYPEID = a.TAGTYPEID" That works just fine! Now I want, that the tagtypetext cell is a combobox with all the entrys of tagtypetext from the table tb_tagtypes. And that, according to what tagtypeid is stored in tb_tags, the right row of the combobox should be displayed when filling the datagrid. Hope I made it clear enough, if not, I willtry my best to answer your questions. Thanks, Matthias
-
Hi, Im stuck! I habe a firebird database for which I am writing a VB.net frontend. Among others I have a table named tb_tags with the following collumns: Tag;Tagtext;Tagtypeid And a Table named tb_tagtypes with the collumns: Tagtypeid;tagtypetext I am filling a datagrid with the SQL command: "SELECT a.tag, a.tagtext, b.tagtypetext FROM tb_tagtypes b join TB_tags a on b.TAGTYPEID = a.TAGTYPEID" That works just fine! Now I want, that the tagtypetext cell is a combobox with all the entrys of tagtypetext from the table tb_tagtypes. And that, according to what tagtypeid is stored in tb_tags, the right row of the combobox should be displayed when filling the datagrid. Hope I made it clear enough, if not, I willtry my best to answer your questions. Thanks, Matthias
So you already have the data you need to populate the combo in your code, extract a list of the tagtypes into another collection, possibly a simple string collection, and bind that to the combobox via it's data source.
Never underestimate the power of human stupidity RAH