Fill ComboBox inside a DataGridView with two Different Tables in C#? -
i capable of filling combobox 1 datatable. not able fill same combobox datatable during runtime. first datatable , second datatable contains different data same columns.
dtone= abcd.retrivdata(); cnsmnm.datasource = dtone; cnsmnm.displaymember = "one_name"; cnsmnm.valuemember = "one_id";
second datatable
dtsecond= efgh.retrivdata(); cnsmnm.datasource = dtsecond; cnsmnm.displaymember = "one_name"; cnsmnm.valuemember = "one_id";
you can use datatable.merge method. this:
dtone.merge(dtsecond); cnsmnm.datasource = dtone;
Comments
Post a Comment