title
C# WPF Tutorial 17- Show database values in Table or DataGrid

description
C# - How to get user entered data from datagridview to windows Insert, Update and Delete from DataGridView to sqlite WPF ,MySql Sql database WPF WPF. ★★★Top Online Courses From ProgrammingKnowledge ★★★ Python Programming Course ➡️ http://bit.ly/2vsuMaS ⚫️ http://bit.ly/2GOaeQB Java Programming Course ➡️ http://bit.ly/2GEfQMf ⚫️ http://bit.ly/2Vvjy4a Bash Shell Scripting Course ➡️ http://bit.ly/2DBVF0C ⚫️ http://bit.ly/2UM06vF Linux Command Line Tutorials ➡️ http://bit.ly/2IXuil0 ⚫️ http://bit.ly/2IXukt8 C Programming Course ➡️ http://bit.ly/2GQCiD1 ⚫️ http://bit.ly/2ZGN6ej C++ Programming Course ➡️ http://bit.ly/2V4oEVJ ⚫️ http://bit.ly/2XMvqMs PHP Programming Course ➡️ http://bit.ly/2XP71WH ⚫️ http://bit.ly/2vs3od6 Android Development Course ➡️ http://bit.ly/2UHih5H ⚫️ http://bit.ly/2IMhVci C# Programming Course ➡️ http://bit.ly/2Vr7HEl ⚫️ http://bit.ly/2W6RXTU JavaFx Programming Course ➡️ http://bit.ly/2XMvZWA ⚫️ http://bit.ly/2V2CoAi NodeJs Programming Course ➡️ http://bit.ly/2GPg7gA ⚫️ http://bit.ly/2GQYTQ2 Jenkins Course For Developers and DevOps ➡️ http://bit.ly/2Wd4l4W ⚫️ http://bit.ly/2J1B1ug Scala Programming Tutorial Course ➡️ http://bit.ly/2PysyA4 ⚫️ http://bit.ly/2PCaVj2 Bootstrap Responsive Web Design Tutorial ➡️ http://bit.ly/2DFQ2yC ⚫️ http://bit.ly/2VoJWwH MongoDB Tutorial Course ➡️ http://bit.ly/2LaCJfP ⚫️ http://bit.ly/2WaI7Ap QT C++ GUI Tutorial For Beginners ➡️ http://bit.ly/2vwqHSZ ★★★ Online Courses to learn ★★★ Get 2 FREE Months of Unlimited Classes from skillshare - https://skillshare.eqcm.net/r1KEj Data Science - http://bit.ly/2lD9h5L | http://bit.ly/2lI8wIl Machine Learning - http://bit.ly/2WGGQpb | http://bit.ly/2GghLXX Artificial Intelligence - http://bit.ly/2lYqaYx | http://bit.ly/2NmaPya MERN Stack E-Degree Program - http://bit.ly/2kx2NFe | http://bit.ly/2lWj4no DevOps E-degree - http://bit.ly/2k1PwUQ | http://bit.ly/2k8Ypfy Data Analytics with R - http://bit.ly/2lBKqz8 | http://bit.ly/2lAjos3 AWS Certification Training - http://bit.ly/2kmLtTu | http://bit.ly/2lAkQL1 Projects in Java - http://bit.ly/2kzn25d | http://bit.ly/2lBMffs Machine Learning With TensorFlow - http://bit.ly/2m1z3AF | http://bit.ly/2lBMhnA Angular 8 - Complete Essential Guide - http://bit.ly/2lYvYRP Kotlin Android Development Masterclass - http://bit.ly/2GcblsI Learn iOS Programming Building Advance Projects - http://bit.ly/2kyX7ue ★★★ Follow ★★★ My Website - http://www.codebind.com DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support! Microsoft Visual C#/CLI Windows Controls The Data Grid View C# Tutorial - Binding a DataGridView to a Database c# - How to save datagridview records on database table how can i use data grid view to update data in database using C# WPF Delete in Datagridview and SQL database‎ WPF Save From datagridview to access database‎ WPF Update database from DataGridView‎ transferring multiple row data from listview to datagridview c sharp‎ retrieving seleted value from combobox in datagridview‎ WPF Updating database table from DataGridView‎ WPF update DataSet from DataGridView, and update database from How to Create a Simple Windows Forms C# Database Application Searches related to c# datagridview database c# datagridview without database WPF c# datagrid view WPF How to insert data from DatagridView to MS Access Database WPF

detail
{'title': 'C# WPF Tutorial 17- Show database values in Table or DataGrid', 'heatmap': [{'end': 267.234, 'start': 238.485, 'weight': 1}, {'end': 323.699, 'start': 300.569, 'weight': 0.791}, {'end': 860.364, 'start': 833.623, 'weight': 0.708}], 'summary': 'This tutorial demonstrates connecting a database with a data grid view in a wpf c# application, displaying employee data from an sqlite database, and modifying c# code to load values into a data grid, achieving successful display of database values in a single table and auto generating columns.', 'chapters': [{'end': 180.238, 'segs': [{'end': 146.591, 'src': 'embed', 'start': 31.445, 'weight': 0, 'content': [{'end': 41.53, 'text': 'In this video, I will show you how to connect your database with the data grid view or in simple word, table.', 'start': 31.445, 'duration': 10.085}, {'end': 52.835, 'text': 'So if you want to show the whole data in a single table, you can do that in WPF C Sharp.', 'start': 42.99, 'duration': 9.845}, {'end': 56.776, 'text': "So exactly that I'm going to show you today.", 'start': 53.535, 'duration': 3.241}, {'end': 58.037, 'text': "So let's get started.", 'start': 56.836, 'duration': 1.201}, {'end': 71.677, 'text': 'stop the process and now I have this window here.', 'start': 61.084, 'duration': 10.593}, {'end': 85.841, 'text': 'So what I will do is I will go to the text box not text box, but the toolbox and I search for the data grid here.', 'start': 72.418, 'duration': 13.423}, {'end': 91.286, 'text': 'so this is the data grid which holds our table data.', 'start': 85.841, 'duration': 5.445}, {'end': 105.516, 'text': "so just drag and drop into your window and it looks like this it's nothing but a blank data grid.", 'start': 91.286, 'duration': 14.23}, {'end': 110.161, 'text': 'It has no column or no row set.', 'start': 106.117, 'duration': 4.044}, {'end': 126.81, 'text': 'When you drag and drop this data grid view, you can see in your XAML or XAML view this line of code is added, which is data grid.', 'start': 111.562, 'duration': 15.248}, {'end': 129.133, 'text': 'which is this data grid?', 'start': 126.81, 'duration': 2.323}, {'end': 136.504, 'text': 'auto generate columns false and all the properties of this data grid right.', 'start': 129.133, 'duration': 7.371}, {'end': 144.289, 'text': 'what you need to do first is go here to auto generate columns.', 'start': 136.504, 'duration': 7.785}, {'end': 146.591, 'text': "I'll make it little bit bigger.", 'start': 144.289, 'duration': 2.302}], 'summary': 'Tutorial on connecting a database to a data grid in wpf c#', 'duration': 115.146, 'max_score': 31.445, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ScQhBPHn-Jw/pics/ScQhBPHn-Jw31445.jpg'}], 'start': 0.765, 'title': 'Connecting a database with a data grid view in wpf c# application', 'summary': 'Demonstrates the process of connecting a database with a data grid view in a wpf c# application, allowing users to display data in a single table and auto generate columns for the data grid view.', 'chapters': [{'end': 180.238, 'start': 0.765, 'title': 'Wpf c# application data grid tutorial', 'summary': 'Demonstrates how to connect a database with a data grid view in wpf c# application, enabling users to display the whole data in a single table and auto generate columns for the data grid view.', 'duration': 179.473, 'highlights': ['The video tutorial focuses on connecting a database with the data grid view in WPF C# application. This is the main focus of the tutorial, demonstrating the process of connecting a database with the data grid view in WPF C# application.', 'Auto generating columns for the data grid view is emphasized. The tutorial emphasizes the importance of setting the auto generate columns property to true for the data grid view, enabling the automatic generation of columns for the data.', 'Demonstrating the process of dragging and dropping the data grid view into the window is described. The tutorial explains the process of adding a data grid view to the window by dragging and dropping it from the toolbox, providing a visual representation of the data grid view.']}], 'duration': 179.473, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ScQhBPHn-Jw/pics/ScQhBPHn-Jw765.jpg', 'highlights': ['The video tutorial focuses on connecting a database with the data grid view in WPF C# application.', 'Auto generating columns for the data grid view is emphasized.', 'Demonstrating the process of dragging and dropping the data grid view into the window is described.']}, {'end': 410.652, 'segs': [{'end': 281.485, 'src': 'heatmap', 'start': 238.485, 'weight': 0, 'content': [{'end': 254.873, 'text': "now I want, when I click this load table button, my data base values, which is this database here it's a SQLite database which we are working on.", 'start': 238.485, 'duration': 16.388}, {'end': 262.27, 'text': 'in last few videos, I want to show employee ID, name, surname and age.', 'start': 254.873, 'duration': 7.397}, {'end': 267.234, 'text': 'Four columns I want to show in my data grid view as a table data.', 'start': 262.37, 'duration': 4.864}, {'end': 281.485, 'text': 'So now I just double click this button and I go to the load table text button click event.', 'start': 271.397, 'duration': 10.088}], 'summary': 'When clicking the load table button, the sqlite database should display employee id, name, surname, and age in the data grid view.', 'duration': 43, 'max_score': 238.485, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ScQhBPHn-Jw/pics/ScQhBPHn-Jw238485.jpg'}, {'end': 375.475, 'src': 'heatmap', 'start': 300.569, 'weight': 3, 'content': [{'end': 312.915, 'text': 'sorry to connect our application with the escalite database, so i copy and paste this skeleton here, make it a little bit bigger.', 'start': 300.569, 'duration': 12.346}, {'end': 316.996, 'text': 'so these are the little.', 'start': 312.915, 'duration': 4.081}, {'end': 323.699, 'text': 'this is a little skeleton which i use in every code to connect with my escalite database.', 'start': 316.996, 'duration': 6.703}, {'end': 331.006, 'text': "right, And if you don't recognize this code and you are watching this video for the first time,", 'start': 323.699, 'duration': 7.307}, {'end': 340.535, 'text': 'you can go to the first video in which I have shown you how to connect Escalite with your WPF C sharp application and you know what this code is.', 'start': 331.006, 'duration': 9.529}, {'end': 343.598, 'text': 'First is the connection.', 'start': 341.876, 'duration': 1.722}, {'end': 352.966, 'text': 'SQLite connection and I make a variable for SQLite connection is equal to new SQLite connection and I pass the database connection to it.', 'start': 343.598, 'duration': 9.368}, {'end': 358.17, 'text': 'And then I make a try catch block to catch any exception.', 'start': 353.867, 'duration': 4.303}, {'end': 362.492, 'text': 'and then I open my Escalite database.', 'start': 359.251, 'duration': 3.241}, {'end': 369.534, 'text': 'so I copy this escalitecon.open, and then I prepare my query.', 'start': 362.492, 'duration': 7.042}, {'end': 371.794, 'text': 'so this is a string type.', 'start': 369.534, 'duration': 2.26}, {'end': 375.475, 'text': 'query is equal to select star from my table name.', 'start': 371.794, 'duration': 3.681}], 'summary': 'Code snippet to connect to escalite database with query preparation.', 'duration': 58.479, 'max_score': 300.569, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ScQhBPHn-Jw/pics/ScQhBPHn-Jw300569.jpg'}], 'start': 181.439, 'title': 'Displaying sqlite database in wpf c#', 'summary': "Covers displaying employee data from an sqlite database in a data grid view by adding a 'load table' button, specifying columns, and setting up the button click event, as well as connecting a wpf c# application with an sqlite database by creating a database connection, executing queries, and handling exceptions.", 'chapters': [{'end': 281.485, 'start': 181.439, 'title': 'Sqlite database table display', 'summary': "Discusses how to display employee data from an sqlite database in a data grid view by adding and configuring a 'load table' button, specifying the desired columns, and setting up the button click event.", 'duration': 100.046, 'highlights': ["The chapter explains the process of adding and configuring a 'load table' button to display employee data from an SQLite database in a data grid view.", 'It emphasizes the need to specify the desired columns, including employee ID, name, surname, and age, for the table data display in the data grid view.', 'The chapter also covers the setup of the button click event to trigger the display of the specified database values in the data grid view.']}, {'end': 410.652, 'start': 283.024, 'title': 'Connecting wpf c# application with sqlite database', 'summary': 'Explains the process of writing a code skeleton to connect a wpf c# application with an sqlite database, including creating the database connection, preparing and executing a query, and handling exceptions.', 'duration': 127.628, 'highlights': ['The process of writing a code skeleton to connect a WPF C# application with an SQLite database. The chapter explains the process of writing a code skeleton to connect a WPF C# application with an SQLite database.', 'Creating the SQLite database connection and handling exceptions. The chapter describes creating the SQLite database connection and using a try-catch block to catch any exceptions.', "Preparing and executing a query. The chapter covers preparing a query and executing it using the SQLite command, including an example query of 'select star from my table name.'"]}], 'duration': 229.213, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ScQhBPHn-Jw/pics/ScQhBPHn-Jw181439.jpg', 'highlights': ["Adding 'load table' button to display employee data from SQLite database in data grid view.", 'Specifying columns for table data display: employee ID, name, surname, and age.', 'Setting up button click event to trigger display of specified database values in data grid view.', 'Writing code skeleton to connect WPF C# application with SQLite database.', 'Creating SQLite database connection and handling exceptions using try-catch block.', "Preparing and executing query using SQLite command, e.g., 'select star from my table name.'"]}, {'end': 905.55, 'segs': [{'end': 456.814, 'src': 'embed', 'start': 410.652, 'weight': 4, 'content': [{'end': 418.659, 'text': 'so if you want to copy this, just pause the video and copy this whole code.', 'start': 410.652, 'duration': 8.007}, {'end': 423.7, 'text': "now I'm going to add some more code to this.", 'start': 418.659, 'duration': 5.041}, {'end': 433.602, 'text': 'so first thing we are going to add in this code is we are going to import one namespace.', 'start': 423.7, 'duration': 9.902}, {'end': 447.151, 'text': 'just go at the top and right here using system.data.', 'start': 433.602, 'duration': 13.549}, {'end': 451.312, 'text': "okay, just import this namespace if you don't have this.", 'start': 447.151, 'duration': 4.161}, {'end': 456.814, 'text': "if you already have this, then don't worry, you are on right path.", 'start': 451.312, 'duration': 5.502}], 'summary': 'Instruction on adding a namespace in code for system data.', 'duration': 46.162, 'max_score': 410.652, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ScQhBPHn-Jw/pics/ScQhBPHn-Jw410652.jpg'}, {'end': 566.246, 'src': 'embed', 'start': 487.791, 'weight': 0, 'content': [{'end': 495.242, 'text': 'right now in our database we have six columns employee ids, name, surname, age, username and password.', 'start': 487.791, 'duration': 7.451}, {'end': 497.684, 'text': 'i just want these four columns.', 'start': 495.242, 'duration': 2.442}, {'end': 501.288, 'text': 'so i write the name of these columns as a query.', 'start': 497.684, 'duration': 3.604}, {'end': 515.177, 'text': 'so i, instead of this star, i write eid, comma, name, comma, surname, comma, age.', 'start': 501.288, 'duration': 13.889}, {'end': 520.941, 'text': 'okay, select these four column values from my table.', 'start': 515.177, 'duration': 5.764}, {'end': 524.283, 'text': 'okay, these are the column names.', 'start': 520.941, 'duration': 3.342}, {'end': 528.526, 'text': 'now everything is done.', 'start': 524.283, 'duration': 4.243}, {'end': 539.693, 'text': 'command is set, our command is executed and now I want to transfer my data into the data grid view.', 'start': 528.526, 'duration': 11.167}, {'end': 549.858, 'text': 'so this is the code in between this SQLite close and this command dot SQLite query, non query.', 'start': 539.693, 'duration': 10.165}, {'end': 551.639, 'text': 'execute non query.', 'start': 549.858, 'duration': 1.781}, {'end': 559.563, 'text': 'I will write the code to transfer my data from my database to the data grid view.', 'start': 551.639, 'duration': 7.924}, {'end': 566.246, 'text': 'so first thing I will declare here is SQLite data adopter.', 'start': 559.563, 'duration': 6.683}], 'summary': 'Database query retrieves 4 employee columns for data transfer.', 'duration': 78.455, 'max_score': 487.791, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ScQhBPHn-Jw/pics/ScQhBPHn-Jw487791.jpg'}, {'end': 860.364, 'src': 'heatmap', 'start': 833.623, 'weight': 0.708, 'content': [{'end': 837.606, 'text': 'and now we are going to run this program.', 'start': 833.623, 'duration': 3.983}, {'end': 838.767, 'text': "so let's run it.", 'start': 837.606, 'duration': 1.161}, {'end': 856.02, 'text': 'i have username and password and it opens the second form, and when i click this load table, my eid, name,', 'start': 838.767, 'duration': 17.253}, {'end': 860.364, 'text': 'surname and age column should appear here and all the data in that.', 'start': 856.02, 'duration': 4.344}], 'summary': 'Program runs to display eid, name, surname, and age columns.', 'duration': 26.741, 'max_score': 833.623, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ScQhBPHn-Jw/pics/ScQhBPHn-Jw833623.jpg'}, {'end': 903.349, 'src': 'embed', 'start': 862.005, 'weight': 1, 'content': [{'end': 870.97, 'text': 'I click it and bam! All the data in the database comes in my data grid view.', 'start': 862.005, 'duration': 8.965}, {'end': 874.692, 'text': "So, let's check if the data is correct.", 'start': 871.75, 'duration': 2.942}, {'end': 883.497, 'text': 'SQLite database data, and this is my WPF application.', 'start': 877.213, 'duration': 6.284}, {'end': 893.003, 'text': 'so you just check all the data which is here in the database is also here.', 'start': 883.497, 'duration': 9.506}, {'end': 901.448, 'text': 'so in this way you can connect your data grid with your database.', 'start': 893.003, 'duration': 8.445}, {'end': 903.349, 'text': 'so I hope you have enjoyed this video.', 'start': 901.448, 'duration': 1.901}], 'summary': 'Connect data grid view to sqlite database in wpf application.', 'duration': 41.344, 'max_score': 862.005, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ScQhBPHn-Jw/pics/ScQhBPHn-Jw862005.jpg'}], 'start': 410.652, 'title': 'Modifying c# code for database query and loading values into data grid', 'summary': 'Explains modifying c# code to import namespace, prepare database queries, and select specific columns, aiming to retrieve only four columns. it also demonstrates loading data from a sqlite database into a data grid view using c# code, including declaring sqlite data adapter, transferring data to data table, and updating the data grid view, resulting in successful display of database values in the application.', 'chapters': [{'end': 528.526, 'start': 410.652, 'title': 'C# code modification for database query', 'summary': 'Explains the process of modifying c# code for importing a namespace, preparing a database query, and selecting specific columns, aiming to retrieve only four columns from the database table.', 'duration': 117.874, 'highlights': ["The chapter explains the process of modifying C# code for importing a namespace, aiming to import the 'system.data' namespace if not present.", "The chapter details the steps for preparing a database query in C#, focusing on selecting specific columns from the database table, such as 'eid', 'name', 'surname', and 'age'.", "The chapter emphasizes the importance of modifying the C# code to only retrieve four columns, namely 'eid', 'name', 'surname', and 'age', from the database table."]}, {'end': 905.55, 'start': 528.526, 'title': 'Loading database values into data grid', 'summary': 'Demonstrates how to load data from a sqlite database into a data grid view using c# code, including declaring sqlite data adapter, transferring data to data table, and updating the data grid view, resulting in successful display of database values in the application.', 'duration': 377.024, 'highlights': ['The code involves declaring a SQLite data adapter, transferring data to a data table, and updating the data grid view to successfully display database values in the application.', 'The process includes using C# code to connect the data grid with the SQLite database and verify the successful display of database values in the data grid view.', 'Executing the code results in all the data from the SQLite database appearing in the data grid view, verifying the successful connection between the data grid and the database.']}], 'duration': 494.898, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ScQhBPHn-Jw/pics/ScQhBPHn-Jw410652.jpg', 'highlights': ["The chapter emphasizes the importance of modifying the C# code to only retrieve four columns, namely 'eid', 'name', 'surname', and 'age', from the database table.", 'The process includes using C# code to connect the data grid with the SQLite database and verify the successful display of database values in the data grid view.', 'The code involves declaring a SQLite data adapter, transferring data to a data table, and updating the data grid view to successfully display database values in the application.', "The chapter details the steps for preparing a database query in C#, focusing on selecting specific columns from the database table, such as 'eid', 'name', 'surname', and 'age'.", "The chapter explains the process of modifying C# code for importing a namespace, aiming to import the 'system.data' namespace if not present.", 'Executing the code results in all the data from the SQLite database appearing in the data grid view, verifying the successful connection between the data grid and the database.']}], 'highlights': ['Auto generating columns for the data grid view is emphasized.', "Adding 'load table' button to display employee data from SQLite database in data grid view.", 'The video tutorial focuses on connecting a database with the data grid view in WPF C# application.', 'Specifying columns for table data display: employee ID, name, surname, and age.', 'Setting up button click event to trigger display of specified database values in data grid view.', 'Writing code skeleton to connect WPF C# application with SQLite database.', 'Creating SQLite database connection and handling exceptions using try-catch block.', "Preparing and executing query using SQLite command, e.g., 'select star from my table name.'", "The chapter emphasizes the importance of modifying the C# code to only retrieve four columns, namely 'eid', 'name', 'surname', and 'age', from the database table.", 'The process includes using C# code to connect the data grid with the SQLite database and verify the successful display of database values in the data grid view.', 'The code involves declaring a SQLite data adapter, transferring data to a data table, and updating the data grid view to successfully display database values in the application.', "The chapter details the steps for preparing a database query in C#, focusing on selecting specific columns from the database table, such as 'eid', 'name', 'surname', and 'age'.", "The chapter explains the process of modifying C# code for importing a namespace, aiming to import the 'system.data' namespace if not present.", 'Executing the code results in all the data from the SQLite database appearing in the data grid view, verifying the successful connection between the data grid and the database.', 'Demonstrating the process of dragging and dropping the data grid view into the window is described.']}