Saturday, February 21, 2015

How to add a CheckBox into DataGridView

In this post, I'm going to explain to add a CheckBox into a DataGridViews' Column.  Here, I create a DataGridViewCheckBoxColumn object and add it to the table column.

Fill ComboBox from SQL Server in C#

In this article, I will discuss on filling ComboBox values retrieving from SQL Server Database. I'm using my test Database for retrieving data.

Friday, February 20, 2015

How to run cmd command in c#

Today I'm going to discuss on how to Execute cmd commands in C#. This way, you can easily run cmd commands.Here I used COPY H:\\nbb.txt F:  this command to copy a file (nbb.txt) from H: drive to F: drive.

How to add a ComboBox into DataGridView

In this post, I'm going to explain to add a ComboBox into a DataGridViews' Column.  Here, I create a DataGridViewComboBoxColumn object and add it to the table column. Also I'm using my test Database to fill the ComboBox. You can see the below screenshot of the ComboBox which is inside the DataGridView.

Thursday, February 19, 2015

Filtering DataGridView by Textbox change in C#



In this article, I will show you how to filter a DataGridView when typing in Textbox. One column value should be used to check the word pattern when filtering. Here, I used first_name column values to apply the filtering process. When you type word pattern in Textbox, it will only show the rows which has same pattern with the entered word.

Import data from MS Excel to SQL Server in C#



In many occasions, we need to get data from Microsoft Excel to SQL Server Database for displaying, calculating and manipulating data when developing .NET Applications. So in this case, you can follow this post to import data from MS Excel file.

Wednesday, February 18, 2015

Remove Raw Header in DataGridView

By default, It displays a column with star mark in the DataGridView called Row Header. In many situations this Row Header needed to removed. So,you can remove this column by changing RowHeadersVisible property into False in Properties Window.

How to Display Windows Forms in center of the Screen in C#

When you are developing a Windows form applications in Visual Studio, by default at the run time the form is not position to center of the screen or center of its parent form. This starting position property can be easily set by using following code segment.