Posts

Showing posts from June, 2014

Asynchronous Data Grid View Using Tasks

Image
Hi Guys, This time I made a fully UI Responsive Asynchronous Data Grid for WinForms.  This uses Tasks to call a database asynchronously and fetches data without blocking the main thread. Tasks are Managed Thread Pool Threads so they are efficient compared to regular threads. Before you Start, 1) Visual Studio with .NET Framework 4.5  Step One : The Solution Make a WinForms Application as Following Step Two : Paste the Below Code in the AsyncDataGridView.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Data.SqlClient; using System.Data; namespace AsyncDataGridView.AsyncDataGrid {     public class AsyncDataGridView : DataGridView     {         //Sql Command Object         public SqlCommand SelectCommand { get; set; }         //Connection Stri...