Skip to main content

CODING

C# - DataGridView - Cell Text Show Up With "Square" Characters Instead New Lines Problem

Default text behaviour in a DataGridViewTextBoxCell control is that it doesn't wrap.

The behaviour can be changed using the WrapMode property on the cell style. For example, DataGridView.DefaultCellStyle.WrapMode.

This can cause that new line characters in the text do not apply and that's the reason why they are displayed as a non-printable characters. You can compare this behavior with Text property of a TextBox control when the MultiLine property is set to "false".

C# - DataGridView - Show Controls in All Cells Regardless of Edit

The DataGridView control can display only an actual control when a cell is in edit mode.

The DataGridView is not capable for displaying multiple controls or repeating a set of controls per row. It displays a representation of the control when the cell is not being edited.

The represenation can be a detailed, e.g. the DataGridViewButtonCell draws a button regardless of the cell being in edit or not.

C# - DataGridView - How to Prevent Cell From Being Editable

DataGridView control has a property named ReadOnly that determins if the data in the cell can be changed. The ReadOnly property can be set not only for particular cells but also for entire rows and column. You can achieve this behavior by setting the DataGridViewRow.ReadOnly or DataGridViewColumn.ReadOnly properties.

By default, if a cell's parent row or column is set to read-only, the child cells will adopt the same value.

SQL - Delete Duplicate Rows

Working with data in databases could be very intensive and complex especially if you do not have experience and routine. 

We still grow our knowledgebase with real-life examples that you could use. One of our favorite SQL tips and tricks is how to delete duplicate records in SQL.

SQL Tips and Tricks

Inforbiro is an Information Technology and Marketing Agency with its own Internet marketing network BlicKlik. We have a lot of experience in software development as well as in Internet marketing and advertising. We constantly try not only to develop great web sites, mobile, desktop or facebook applications but also to share our knowledge.