Tutorial CSharp : Auto Complate TextBox di C#

Tutorial Csharp : Cara membuat Auto Complate pada TextBox di Csharp (C#) menggunakan Visual Studio 2010 terbaru dengan mudah, lihat selengkapnya di Sector Code !

Cara membuat Auto Complate di CSharp

Membuat Auto Complate yang terhubung dari Database MySql sudah pernah kami bahas, silahkan di baca kembali Tutorial VB.Net : Membuat AutoComplate TextBox Dari Database, Auto Complate menggunakan Csharp juga tidak jauh berbeda dengan Vb.Net.
Tutorial CSharp : Auto Complate TextBox di C#

Ikuti Langkah - Langkah untuk membuat Auto Complate di C# :

Pertama anda harus membuat sebuah database yang nantinya akan kita tampilkan di TextBox dengan Auto Complate dan mengkoneksikannya dengan Aplikasi yang akan kita buat, pada Tutorial CSharp sebelumnya sudah kami jelaskan bagaimana cara membuat koneksi dari Database MySql menggunakan Class di C#, silahkan baca - baca kembali Tutorial CSharp : Koneksi Database MySql (ODBC),

Langsung saja COpy seluruh Code dibawah ini,
        private void KonekProduct() {
            KlassKoneksi c = new KlassKoneksi();
            c.bukaDB(); // Buka Koneksi Database
            DataSet ds = new DataSet();
            string cmd = "SELECT productID,productBarcode FROM as_products";
            OdbcDataAdapter da = new OdbcDataAdapter(cmd, c.cn);
            OdbcCommandBuilder cmdb = new OdbcCommandBuilder(da);
            da.Fill(ds, "as_products");
            AutoCompleteStringCollection auto = new AutoCompleteStringCollection();
            for (int x = 0; x < ds.Tables[0].Rows.Count - 1; x++ ) {
                auto.Add(ds.Tables[0].Rows[x]["productBarcode"].ToString());
            }
            textBox2.AutoCompleteSource = AutoCompleteSource.CustomSource;
            textBox2.AutoCompleteMode = AutoCompleteMode.Suggest;
            textBox2.AutoCompleteCustomSource = auto;
            da.Dispose(); // Tutup Data Adapter
            c.tutupDB(); // Tutup Koneksi Database
        }
Tuliskan Code diatas pada Form anda, selanjutnya tinggal panggil melalui Event Load;
        private void FrmTransaksi_Load(object sender, EventArgs e) {
            KonekProduct(); // panggil Auto Complate            
        }
Jika sudah selesai maka Anda sudah berhasil membuat Auto Complate di CSharp (C#) tanpa ada kendala apapun, jangan lupa dishare jika bermanfaat, terima kasih ;)

Next Recomended


Feel free to code it up and send us a pull request.

Hi everyone, let's me know how much this lesson can help your work. Please Subscribe and Follow Our Social Media 'kodeajaib[dot]com' to get Latest tutorials and will be send to your email everyday for free!, Just hit a comment if you have confused. Nice to meet you and Happy coding :) all ^^



Follow by E-Mail


Name

ADO.NET,3,Ajax,6,Android,9,AngularJS,4,ASP.NET,4,Blogger Tutorials,7,Bootstrap,7,C++,1,Codeigniter,2,Cplusplus,6,Crystal Report,6,CSharp,25,Ebook Java,2,FlyExam,1,FSharp,3,Game Development,2,Java,35,JDBC,2,Laravel,84,Lumen,2,MariaDB,2,Ms Access,3,MySQL,31,ODBC,6,OleDB,1,PHP,14,PHP Framework,5,PHP MYSQLI,9,PHP OOP,5,Python,8,Python 3,4,SQL Server,4,SQLite,4,Uncategorized,5,Vb 6,2,Vb.Net,89,Video,48,Vue Js,4,WPF,2,Yii,3,
ltr
item
KODE AJAIB: Tutorial CSharp : Auto Complate TextBox di C#
Tutorial CSharp : Auto Complate TextBox di C#
Tutorial Csharp : Cara membuat Auto Complate pada TextBox di Csharp (C#) menggunakan Visual Studio 2010 terbaru dengan mudah, lihat selengkapnya di Sector Code !
http://2.bp.blogspot.com/-nUCPEAHW2RQ/VdC4iWsvEMI/AAAAAAAAAk0/H4VOnW_CcCg/s1600/auto-complate-csharp.png
http://2.bp.blogspot.com/-nUCPEAHW2RQ/VdC4iWsvEMI/AAAAAAAAAk0/H4VOnW_CcCg/s72-c/auto-complate-csharp.png
KODE AJAIB
https://www.kodeajaib.com/2015/08/tutorial-csharp-auto-complate-textbox.html
https://www.kodeajaib.com/
https://www.kodeajaib.com/
https://www.kodeajaib.com/2015/08/tutorial-csharp-auto-complate-textbox.html
true
3214704946184383982
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy