How To: Read Only DataGridView Control, C#

Quick Tip:
By Default, DataGridView control columns are set as editable, but in many cases, you may not want your grid data to be edited, or you may want to set your own controls that enable when and how the data get edited. The following C# code snippet will set the DataGridView columns of your DataGridView to ReadOnly.

foreach(DataGridViewColumn dc in My_DataGridView.Columns){
dc.ReadOnly = true;

This snippet iterates through the  DataGridView.Columns collection and sets  the ReadOnly property for each DataGridViewColumn item referenced as dc to true (boolean).

In The Beginning…

Well here it is. My first post to this blog. I just finished installing WordPress to my server after using Blogger for quite a while. Why the change? Well, I like having control over my own “stuff”. Don’t get me wrong. Blogger is a fine platform, but I prefer to have my things organized under the same roof and not have to manage a handful of different services across the web.

After searching for a new blogging solution, I looked at a number of different releases for both Windows/IIS and Linux/Apache platforms. I finally decided on WordPress for a number of reasons.

1. Support and stability – WordPress is a proven solution and has a large user base, which also means a lot of peer support.
2. Ease of use – It was easy to set up and ran on my server without any additional requirements.
3. Control – WordPress has built in controls for managing posts and comments, and they’re easy to use. I don’t have to fuss over design and (X)HTML if I don’t want to and still get a nice clean page. On the other hand, If I do want to get into altering page design and (X)HTML, I can do that to through the built-in CMS tools.
4. Organization – One of the features I like best is the categories. Categories allow me to organize posts into groups and categories/sub-categories making it easy to find the topics that interest you most.

All in all, The set up was actually pretty simple and I had a working blog in a matter of minutes. The next step is getting the layout and visual appeal to my liking.