четверг, 13 июня 2013 г.

Regex helpers

RegexBuddy tool - very powerfull but not free.
http://regexlib.com - online resource, not used that much. I'll just keep the link here for feature use.

пятница, 18 января 2013 г.

Remove rows from DataGridView

Today I faced with funny bug.
Once I set some collection as DataSource for DataGridView, the collection becomes read-only and I can't remove anything from there.

I needed just to remove selected rows from DataGridView. And I've tried to do that with very straightforward way:
dataGridView1.SelectedRows.Clear();
And got exception:
System.NotSupportedException: Operation not supported. Collection is read-only.

Workaround I found is:
var selectedRow = dataGridView1.SelectedRows[0];
var cellValue= selectedRow.Cells["RowName"].FormattedValue;

var collection = (DataView) dataGridView1.DataSource;
collection.Sort = "RowName";

var rowIndex = collection.Find(cellValue);
collection.Delete(rowIndex);

Here I used
SelectedRows[0]
since in my case multiple selection is turned off.

So 6 lines of code just to remove 1 row from DataGridView.... Maybe is there more elegant way to do that?

пятница, 5 октября 2012 г.

Installattion and configuration of TFS2012

Team Foundation Server (TFS) is popular application lifecycle management (ALM) system. It includes such services as source control, build service, reporting service etc. 
TFS is pretty flexible system, you can add services you need (for instance, alarms, custom work item's controls and chek-in policies). By adding custom components you will enlarge functionality as you need.
Let's have a look how to start using TFS.

среда, 19 сентября 2012 г.

SQL exersice

One of my mates asked me a question related to building of sql query. She was asked that question on the interview for one IT company and had a difficulties with finding a solution.

воскресенье, 16 сентября 2012 г.

Code smells

A couple of days ago I finished reading the wonderful book by Robert Martin "Clean code". Despite all examples were on Java I dived into code in the book with a big pleasure. Robert explains things any developer should know and use every day. Closer to the end of the book he formulates all rules he told about as short and clear "code smells".

пятница, 31 августа 2012 г.

Some tips on the use ILMerge

What is it?
IlMerge is a small utility produced by Microsoft. It's free and you can download the last version in Microsoft Download Center. Before to start using it you have to install downloaded .msi package. After installation you could find ILMerge.exe file in folder c:\Program Files\Microsoft\ILMerge\ (or c:\Program Files (x86)\Microsoft\ILMerge\ for x64 OS).