How To Set TreeView Nodes Values Into DataGridView Rows Using Visual Basic .Net
In thisVB.NET Tutorial we will see How To Get TreeView Nodes Data And Set It Into DataGridView Rows Using For Loop On Button Click EventInVisual Basic.NetProgramming Language And Visual Studio Editor.
Project Source Code:
Public Class TreeView_To_Datagridview
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
' go through all nodes
For i As Integer = 0 To TreeView1.Nodes.Count - 1 Step +1
' create a new node
Dim node As New TreeNode()
' set the created node equal to the current one
node = TreeView1.Nodes(i)
' create a row
Dim row(node.Nodes.Count) As Object
' add values from node to the row
For j As Integer = 0 To node.Nodes.Count - 1 Step +1
How To Add All DataGridView Values Into MySQL Database Using C#
In This C#TutorialWe Will See How To Populate A Datagridview From Datatable And Add All Datagridview Row's Records In MySQL Database Using For Loop And Mysqlcommand with Parameters InCsharpProgramming Language And Visual Studio Editor.
Project Source Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
namespace Csharp_Tutorials
{
public partial class Insert_All_DGV_Data_Into_MySQL : Form
{
public Insert_All_DGV_Data_Into_MySQL()
{
InitializeComponent();
}
// mysql connection
MySqlConnection connection = new MySqlConnection("datasource=localhost;port=3306;Initial Catalog='mydb';username=root;password=");
How To Search Data In MySQL Database Between Two Dates Using C#
In This C#TutorialWe Will See How To Get Records Between Two Date From MySQL Database Table Using Two DateTimePicker And Display The Selected Records Into A DataGridView Rows UsingCsharpProgramming Language And Visual Studio Editor.
Project Source Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
namespace Csharp_Tutorials
{
public partial class Search_Data_In_MySQL_Between_2_Date : Form
{
public Search_Data_In_MySQL_Between_2_Date()
{
InitializeComponent();
}
// mysql connection
MySqlConnection connection = new MySqlConnection("datasource=localhost;port=3306;Initial Catalog='mydb';username=root;password=");
MySqlCommand command = new MySqlCommand("SELECT `id`, `first_name`, `last_name`, `birthdate`, `address` FROM `student` WHERE `birthdate` BETWEEN @d1 AND @d2", connection);
// add values to the parameters form dateTimePickers
How To Get And Set DataGridView Data To Txt File Text Using Visual Basic .Net
In thisVB.NET Tutorial we will see How To Import Records From A Text File And Display The Values Into DataGridView, and Export DataGridView Rows Data To a Txt File Using DataTable, TextWriter, StreamWriter, ReadAllLinesInVisual Basic.Net Programming Language And Visual Studio Editor.
Project Source Code:
Imports System.IO
Public Class TXT_IMPORT_EXPORT_DGV
Dim table1 As New DataTable()
Dim table2 As New DataTable()
Private Sub TXT_IMPORT_EXPORT_DGV_Load(sender As Object, e As EventArgs) Handles MyBase.Load
How To Get And Set DataGridView Data To Txt File Text Using C#
In This C#TutorialWe Will See How To Import Records From A Text File And Display The Values Into DataGridView, and Export DataGridView Rows Data To a Txt File Using DataTable, TextWriter, StreamWriter, ReadAllLines InCsharpProgramming Language And Visual Studio Editor.
PART 1
PART 2
Project Source Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Csharp_Tutorials
{
public partial class Import_Export_DGV_to_TXT_File : Form