Category Archives: WPF

How to add rows and columns to a WPF Grid programmatically

Introduction In this post we will see how to add rows and columns to a Grid in WPF programmatically using code behind. After adding rows and columns to the Grid, we will add some Buttons to it. We will set background of these buttons to random colors using RandomColor class created in my last article… Read More »

Data binding in WPF DataGrid control using SQL Server database

In this article I will explain how to display data from a SQL Server database table in a WPF DataGrid control Introduction Displaying data in a grid is a common task in a windows application. In a windows application we use DataGridView control for this task. In WPF we can use DataGrid control for the… Read More »