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

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -