Posts

Showing posts from December, 2016

Donate

How To Upload And Publish Visual Studio 2012 Project To GitHub

Image
Hello, In this tutorial, I will demonstrate on how to upload and publish a Visual Studio 2012 project to GitHub. Steps 1 and 2 are needed because editions of Visual Studio (2013 and 2015) has built-in extension for Git. So to start with, perform the detailed steps below. 1. Close all instance of Visual Studio. Download and Install Visual Studio 2012 Update 4 (Latest Update) 2. Download and Install Visual Studio Tools for Git. (Search in marketplace.visualstudio.com) 3. Create a sample Repository. (Uncheck Initialize this repository with a README) 4. Copy the url generated by the repository with .git extension. This will be used when you publish the project. 5. Open Sample project to be committed. Right click on the solution and choose Git instead of Team Foundation Version Control. 6. Open Team Explorer via View Menu (View-> Team Explorer). 7. Click Home (Home icon) and then choose Changes. This will open up the project in which you can select files to be Included o

Github Repository (DotNetGenetics)

Hi! Today, I just created a repository account in GitHub .NET Genetics . I'll be adding some snippets and projects posted in this blog or in the .NET Community VBForums. Cheers! :-)

AllowUsersToAddRows In DataGridView Not Working If DataSource is List<T>

Greetings! Going back to a previous project of mine, I found out that some DataGridView control's DataSource where set using List<T> and as a result, prevented the users to add new data to the DataGridView. private void List() { List<Item> list = new List<Item>(); for ( int i = 0; i < 100; i++) { list.Add( new Item() { ID = i, Name = String.Format( "{0}:{1}" , "Test" , i.ToString()) }); } DataGridView1.DataSource = list; } The common solution is to use DataTable as the DataSource but if we want to use a List type object, we could use BindingList<T> or BindingSource. Both of these have AllowNew property which indicates that you can add items to the list using the AddNew() method. It is stated in DataGridView.AllowUsersToAddRows that " If the DataGridView is bound to data, the user is allowed to add rows if both this property and the data source's IBindingList.AllowNew property are set to true. ".Well, Lis

Donate