<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4751822682029543386</id><updated>2011-11-27T16:54:44.465-08:00</updated><title type='text'>The Home of .NET Code snippets</title><subtitle type='html'>The home of the all .NET code snippets in C# and vb.net</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://netcodesnippet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://netcodesnippet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>RRave</name><uri>http://www.blogger.com/profile/02162942492813501463</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_XXhoLiK87qs/SeoObND7qDI/AAAAAAAAADo/ROkVa_JFjkY/S220/profile.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4751822682029543386.post-5119520489142062655</id><published>2010-09-13T07:06:00.000-07:00</published><updated>2010-10-21T01:36:54.678-07:00</updated><title type='text'>The New .NET Community web Portal</title><content type='html'>Dear My Friends,&lt;br /&gt;&lt;br /&gt;I have launch the new .NET Community website to help to all developers and software professionals than more this blog.&lt;br /&gt;&lt;br /&gt;Please visitor, you can find all latest technologies articles, tips and codesnippet in &lt;a href="http://www.codegain.com"&gt;www.codegain.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;even you can publish your blog or articles and etc in &lt;a href="http://www.codegain.com"&gt;www.codegain.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'm planning to open article competition,it will help to all the developers and software professional to show their talent and earn or win free gifts and cash prizes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thank you&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4751822682029543386-5119520489142062655?l=netcodesnippet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netcodesnippet.blogspot.com/feeds/5119520489142062655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netcodesnippet.blogspot.com/2010/09/new-web-site.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/5119520489142062655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/5119520489142062655'/><link rel='alternate' type='text/html' href='http://netcodesnippet.blogspot.com/2010/09/new-web-site.html' title='The New .NET Community web Portal'/><author><name>RRave</name><uri>http://www.blogger.com/profile/02162942492813501463</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_XXhoLiK87qs/SeoObND7qDI/AAAAAAAAADo/ROkVa_JFjkY/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4751822682029543386.post-7081822211629322476</id><published>2009-05-12T19:59:00.000-07:00</published><updated>2009-05-12T20:11:37.473-07:00</updated><title type='text'>Made XML file from object collection witrh LINQ</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;Last time i seem in the forum, he ask a question how to make XML file from the object collection or array with LINQ.Because of LINQ has a excellent support to XML.&lt;br /&gt;&lt;br /&gt;Here Code snippet.&lt;br /&gt;&lt;br /&gt;To this i just take simple example.&lt;br /&gt;&lt;br /&gt;C#.NET&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Private void MakeXMlFile()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; Employee[] employees = new[] {&lt;br /&gt;new Employee {FirstName = "Joe", LastName = "Rattz", Email="Test@hotmail.com",Phone="12345343"&lt;br /&gt;},&lt;br /&gt;new Employee {FirstName = "Ewan", LastName = "Buckingham",&lt;br /&gt;Email="Test2@hotmail.com",Phone="122232345343"}};&lt;br /&gt;&lt;br /&gt;            XElement xBookParticipants =&lt;br /&gt;            new XElement("Employees",&lt;br /&gt;            employees.Select(p =&gt;&lt;br /&gt;            new XElement("Employee",         &lt;br /&gt;            new XElement("FirstName", p.FirstName),&lt;br /&gt;            new XElement("LastName", p.LastName),new XElement("Email",p.Email),&lt;br /&gt;            new XElement("Phone",p.Phone))));&lt;br /&gt;            Console.WriteLine(employees);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;VB.NET&lt;br /&gt;&lt;br /&gt; Class Employee&lt;br /&gt;        Public FirstName As String&lt;br /&gt;        Public LastName As String&lt;br /&gt;        Public Email As String&lt;br /&gt;        Public Phone As String&lt;br /&gt;    End Class&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private sub MakeXML()&lt;br /&gt;&lt;br /&gt; Dim employees As Employee() = New () {New Employee(), New Employee()}&lt;br /&gt;            &lt;br /&gt;            Dim xBookParticipants As New XElement("Employees", employees.[Select](Function(p) New XElement("Employee", New XElement("FirstName", p.FirstName), New XElement("LastName", p.LastName), New XElement("Email", p.Email), New XElement("Phone", p.Phone))))&lt;br /&gt;            Console.WriteLine(employees)&lt;br /&gt;            Console.ReadLine()&lt;br /&gt;        End Sub&lt;br /&gt;&lt;br /&gt;Keep It Watch&lt;br /&gt;Thank you&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4751822682029543386-7081822211629322476?l=netcodesnippet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netcodesnippet.blogspot.com/feeds/7081822211629322476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netcodesnippet.blogspot.com/2009/05/made-xml-file-from-object-collection.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/7081822211629322476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/7081822211629322476'/><link rel='alternate' type='text/html' href='http://netcodesnippet.blogspot.com/2009/05/made-xml-file-from-object-collection.html' title='Made XML file from object collection witrh LINQ'/><author><name>RRave</name><uri>http://www.blogger.com/profile/02162942492813501463</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_XXhoLiK87qs/SeoObND7qDI/AAAAAAAAADo/ROkVa_JFjkY/S220/profile.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4751822682029543386.post-8159004401502957671</id><published>2009-04-29T11:24:00.000-07:00</published><updated>2009-04-29T11:29:43.574-07:00</updated><title type='text'>How to write Gridview data to XML file in .NET</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;One my colleague asked me yesterday , how we could save the Grid View Data to XML File, just i think come to this point and share with you.&lt;br /&gt;&lt;br /&gt;Just Read data from  the Grid View  to DataSet, then we need write that dataset ti XML file.&lt;br /&gt;&lt;br /&gt;C#:&lt;br /&gt;&lt;br /&gt; DataSet ds = new DataSet("TestDataset");&lt;br /&gt;        DataTable dt = new DataTable("TestDataTable");&lt;br /&gt;        dt.Columns.Add("Id", System.Type.GetType("System.String"));&lt;br /&gt;        ds.Tables.Add(dt);&lt;br /&gt;        //Add any number columns here&lt;br /&gt;        for (int count = 0; count &lt; GridView1.Rows.Count; count++)&lt;br /&gt;        {&lt;br /&gt;            DataRow dr = dt.NewRow();&lt;br /&gt;            dr[0] = GridView1.Rows[count].Cells[0].Text;&lt;br /&gt;            //you can add values to all columns in datatable &lt;br /&gt;            dt.Rows.Add(dr);&lt;br /&gt;        }&lt;br /&gt;        ds.Tables[0].WriteXml("d:\\test2.xml");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;VB.NET:&lt;br /&gt;&lt;br /&gt;Dim ds As New DataSet("TestDataset")&lt;br /&gt;Dim dt As New DataTable("TestDataTable")&lt;br /&gt;dt.Columns.Add("Id", System.Type.[GetType]("System.String"))&lt;br /&gt;ds.Tables.Add(dt)&lt;br /&gt;'Add any number columns here&lt;br /&gt;For count As Integer = 0 To GridView1.Rows.Count - 1&lt;br /&gt;    Dim dr As DataRow = dt.NewRow()&lt;br /&gt;    dr(0) = GridView1.Rows(count).Cells(0).Text&lt;br /&gt;    'you can add values to all columns in datatable &lt;br /&gt;    dt.Rows.Add(dr)&lt;br /&gt;Next&lt;br /&gt;ds.Tables(0).WriteXml("d:\test2.xml")&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That's it&lt;br /&gt;&lt;br /&gt;Thank you &lt;br /&gt;Keep It watch.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4751822682029543386-8159004401502957671?l=netcodesnippet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netcodesnippet.blogspot.com/feeds/8159004401502957671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netcodesnippet.blogspot.com/2009/04/how-to-write-gridview-data-to-xml-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/8159004401502957671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/8159004401502957671'/><link rel='alternate' type='text/html' href='http://netcodesnippet.blogspot.com/2009/04/how-to-write-gridview-data-to-xml-file.html' title='How to write Gridview data to XML file in .NET'/><author><name>RRave</name><uri>http://www.blogger.com/profile/02162942492813501463</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_XXhoLiK87qs/SeoObND7qDI/AAAAAAAAADo/ROkVa_JFjkY/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4751822682029543386.post-4741940368436400294</id><published>2009-04-29T11:14:00.000-07:00</published><updated>2009-04-29T11:17:11.044-07:00</updated><title type='text'>How to pass the value when call exe in another application in .NET</title><content type='html'>Hi Guys,&lt;br /&gt;&lt;br /&gt;I seem in forums lot's of the developer asking how to pass the arguments when they call exe within the another application in.NET. is quite easy.&lt;br /&gt;&lt;br /&gt;Code &lt;br /&gt;&lt;br /&gt;C#:&lt;br /&gt;&lt;br /&gt;Process process = new Process();&lt;br /&gt;            process.StartInfo = new ProcessStartInfo("abc.exe");&lt;br /&gt;            process.StartInfo.Arguments = "folderpath "; // if you need suply multiple arguments you need put space "A B"&lt;br /&gt;            process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;&lt;br /&gt;            process.Start();&lt;br /&gt;&lt;br /&gt;VB.NET:&lt;br /&gt;&lt;br /&gt;Dim process As New Process()&lt;br /&gt;process.StartInfo = New ProcessStartInfo("abc.exe")&lt;br /&gt;process.StartInfo.Arguments = "folderpath "&lt;br /&gt;' if you need suply multiple arguments you need put space "A B"&lt;br /&gt;process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden&lt;br /&gt;process.Start()&lt;br /&gt;&lt;br /&gt;Thank you&lt;br /&gt;Keep It Watch&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4751822682029543386-4741940368436400294?l=netcodesnippet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netcodesnippet.blogspot.com/feeds/4741940368436400294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netcodesnippet.blogspot.com/2009/04/how-to-pass-value-when-call-exe-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/4741940368436400294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/4741940368436400294'/><link rel='alternate' type='text/html' href='http://netcodesnippet.blogspot.com/2009/04/how-to-pass-value-when-call-exe-in.html' title='How to pass the value when call exe in another application in .NET'/><author><name>RRave</name><uri>http://www.blogger.com/profile/02162942492813501463</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_XXhoLiK87qs/SeoObND7qDI/AAAAAAAAADo/ROkVa_JFjkY/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4751822682029543386.post-4731597696652798033</id><published>2009-04-28T23:02:00.000-07:00</published><updated>2009-04-28T23:04:46.231-07:00</updated><title type='text'>Get Version info in Windows mobile</title><content type='html'>Hi Guys&lt;br /&gt;&lt;br /&gt;Last time i look  most of guys asking how to get the version information in Windows Mobile with .NET Compact Framework. it pretty easy&lt;br /&gt;&lt;br /&gt; private string GetVersionInfo()&lt;br /&gt;        {&lt;br /&gt;            Version version = Environment.Version;&lt;br /&gt;            return version.ToString();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;Thank you&lt;br /&gt;Keep It Watch&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4751822682029543386-4731597696652798033?l=netcodesnippet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netcodesnippet.blogspot.com/feeds/4731597696652798033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netcodesnippet.blogspot.com/2009/04/get-version-info-in-windows-mobile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/4731597696652798033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/4731597696652798033'/><link rel='alternate' type='text/html' href='http://netcodesnippet.blogspot.com/2009/04/get-version-info-in-windows-mobile.html' title='Get Version info in Windows mobile'/><author><name>RRave</name><uri>http://www.blogger.com/profile/02162942492813501463</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_XXhoLiK87qs/SeoObND7qDI/AAAAAAAAADo/ROkVa_JFjkY/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4751822682029543386.post-1330244053641024439</id><published>2009-04-24T10:20:00.000-07:00</published><updated>2009-04-24T11:51:29.556-07:00</updated><title type='text'>Search a types of file within the Directory with recursive in C#</title><content type='html'>Hi Guys,&lt;br /&gt;&lt;br /&gt;Following code support to search  types file with in the Directory including sub directories also.&lt;br /&gt;&lt;br /&gt;public class FileSearch&lt;br /&gt;    {&lt;br /&gt;        ArrayList _extensions;&lt;br /&gt;        bool _recursive;&lt;br /&gt;        public ArrayList SearchExtensions&lt;br /&gt;        {&lt;br /&gt;            get { return _extensions; }&lt;br /&gt;        }&lt;br /&gt;        public bool Recursive&lt;br /&gt;        {&lt;br /&gt;            get { return _recursive; }&lt;br /&gt;            set { _recursive = value; }&lt;br /&gt;        }&lt;br /&gt;        public FileSearch()&lt;br /&gt;        {&lt;br /&gt;            _extensions = ArrayList.Synchronized(new ArrayList());&lt;br /&gt;            _recursive = true;&lt;br /&gt;        }&lt;br /&gt;        public FileInfo[] Search(string path)&lt;br /&gt;        {&lt;br /&gt;            DirectoryInfo root = new DirectoryInfo(path);&lt;br /&gt;            ArrayList subFiles = new ArrayList();&lt;br /&gt;            foreach (FileInfo file in root.GetFiles())&lt;br /&gt;            {&lt;br /&gt;                if (_extensions.Contains(file.Extension))&lt;br /&gt;                {&lt;br /&gt;                    subFiles.Add(file);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            if (_recursive)&lt;br /&gt;            {&lt;br /&gt;                foreach (DirectoryInfo directory in root.GetDirectories())&lt;br /&gt;                {&lt;br /&gt;                    subFiles.AddRange(Search(directory.FullName));&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            return (FileInfo[])subFiles.ToArray(typeof(FileInfo));&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;How to Use:&lt;br /&gt;&lt;br /&gt;             FileSearch fileser = new FileSearch();&lt;br /&gt;            fileser.Recursive = true;&lt;br /&gt;            fileser.SearchExtensions.Add(".rar");&lt;br /&gt;            FileInfo[] dirRar = fileser.Search("D:\\test");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thank you&lt;br /&gt;Keep It Watch&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4751822682029543386-1330244053641024439?l=netcodesnippet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netcodesnippet.blogspot.com/feeds/1330244053641024439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netcodesnippet.blogspot.com/2009/04/search-type-mof-file-within-directory.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/1330244053641024439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/1330244053641024439'/><link rel='alternate' type='text/html' href='http://netcodesnippet.blogspot.com/2009/04/search-type-mof-file-within-directory.html' title='Search a types of file within the Directory with recursive in C#'/><author><name>RRave</name><uri>http://www.blogger.com/profile/02162942492813501463</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_XXhoLiK87qs/SeoObND7qDI/AAAAAAAAADo/ROkVa_JFjkY/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4751822682029543386.post-414477627205099388</id><published>2009-04-24T08:18:00.000-07:00</published><updated>2009-04-24T08:22:02.430-07:00</updated><title type='text'>Create A Complete Grid with programmetrically in C#</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;This code snippet to help build windows form grid  Under the Windows Presentation Foundation with Winodws Host Object.and also it C# code.&lt;br /&gt;&lt;br /&gt;Note:Before add this code you need add Windows Host Object WPF Windows under the any parent control, and also rename to windowsFormsHostDetail.&lt;br /&gt;&lt;br /&gt;internal void WindowsFormGridInit()&lt;br /&gt;        {&lt;br /&gt;            System.Windows.Forms.DataGridViewTextBoxColumn Column2;&lt;br /&gt;            System.Windows.Forms.DataGridViewCheckBoxColumn Column3;&lt;br /&gt;            System.Windows.Forms.DataGridViewCheckBoxColumn Column4;&lt;br /&gt;            System.Windows.Forms.DataGridViewTextBoxColumn Column5;&lt;br /&gt;            System.Windows.Forms.DataGridViewCheckBoxColumn Column6;&lt;br /&gt;            System.Windows.Forms.DataGridViewTextBoxColumn columnDestValueField;&lt;br /&gt;            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();&lt;br /&gt;&lt;br /&gt;            dataGridViewDetail = new System.Windows.Forms.DataGridView();&lt;br /&gt;            dataGridViewDetail.AllowUserToAddRows = false;&lt;br /&gt;            dataGridViewDetail.DataError += new DataGridViewDataErrorEventHandler(dataGridViewDetail_DataError);&lt;br /&gt;            dataGridViewDetail.CellValidating += new DataGridViewCellValidatingEventHandler(dataGridViewDetail_CellValidating);&lt;br /&gt;            Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();&lt;br /&gt;            columnDestValueField = new DataGridViewTextBoxColumn();&lt;br /&gt;            Column3 = new System.Windows.Forms.DataGridViewCheckBoxColumn();&lt;br /&gt;            Column4 = new System.Windows.Forms.DataGridViewCheckBoxColumn();&lt;br /&gt;            Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();&lt;br /&gt;            Column6 = new System.Windows.Forms.DataGridViewCheckBoxColumn();&lt;br /&gt;            Column7 = new System.Windows.Forms.DataGridViewComboBoxColumn();&lt;br /&gt;&lt;br /&gt;            ((System.ComponentModel.ISupportInitialize)(dataGridViewDetail)).BeginInit();&lt;br /&gt;&lt;br /&gt;            // &lt;br /&gt;            // dataGridView1&lt;br /&gt;            // &lt;br /&gt;            dataGridViewCellStyle1.BackColor = System.Drawing.Color.LemonChiffon;&lt;br /&gt;            dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black;&lt;br /&gt;            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.Beige;&lt;br /&gt;            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));&lt;br /&gt;            dataGridViewDetail.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;&lt;br /&gt;            dataGridViewDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;&lt;br /&gt;            dataGridViewDetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {&lt;br /&gt;             Column2,&lt;br /&gt;             columnDestValueField,&lt;br /&gt;             Column3,&lt;br /&gt;             Column4,&lt;br /&gt;             Column5,&lt;br /&gt;             Column6,&lt;br /&gt;             Column7&lt;br /&gt;            &lt;br /&gt;            });&lt;br /&gt;            dataGridViewDetail.Location = new System.Drawing.Point(40, 46);&lt;br /&gt;            dataGridViewDetail.Name = "dataGridView1";&lt;br /&gt;            dataGridViewDetail.RowHeadersVisible = false;&lt;br /&gt;            dataGridViewDetail.Size = new System.Drawing.Size(655, 150);&lt;br /&gt;            dataGridViewDetail.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;&lt;br /&gt;            dataGridViewDetail.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.Raised;&lt;br /&gt;            dataGridViewDetail.BackgroundColor = System.Drawing.Color.Gainsboro;&lt;br /&gt;            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();&lt;br /&gt;            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;&lt;br /&gt;            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Blue;&lt;br /&gt;            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            dataGridViewDetail.TabIndex = 0;&lt;br /&gt;            // &lt;br /&gt;            // Column2&lt;br /&gt;            // &lt;br /&gt;            Column2.HeaderText = "Destination Display Name";&lt;br /&gt;            Column2.Name = "Column2";&lt;br /&gt;            Column2.DataPropertyName = "DestinationDisplayField";&lt;br /&gt;            Column2.ReadOnly = true;&lt;br /&gt;            Column2.Width = 200;&lt;br /&gt;            Column2.DefaultCellStyle = dataGridViewCellStyle2;&lt;br /&gt;            Column2.DisplayIndex = 0;&lt;br /&gt;&lt;br /&gt;            // Destionation Value Field&lt;br /&gt;&lt;br /&gt;            columnDestValueField.HeaderText = "Destination Element Name";&lt;br /&gt;            columnDestValueField.Width = 150;&lt;br /&gt;            columnDestValueField.DefaultCellStyle = dataGridViewCellStyle2;&lt;br /&gt;            columnDestValueField.DataPropertyName = "DestionationValueField";&lt;br /&gt;            columnDestValueField.ReadOnly = true;&lt;br /&gt;            columnDestValueField.Width = 200;&lt;br /&gt;            columnDestValueField.Name = "DestValueField";&lt;br /&gt;            columnDestValueField.DisplayIndex = 1;&lt;br /&gt;            // &lt;br /&gt;            // Column3&lt;br /&gt;            // &lt;br /&gt;            Column3.HeaderText = "Ignore";&lt;br /&gt;            Column3.DataPropertyName = "IsIgnore";&lt;br /&gt;            Column3.Name = "Column3";&lt;br /&gt;            Column3.DisplayIndex = 2;&lt;br /&gt;            Column3.Visible = false;&lt;br /&gt;            //Column3.DefaultCellStyle = dataGridViewCellStyle2;&lt;br /&gt;            // &lt;br /&gt;            // Column4&lt;br /&gt;            // &lt;br /&gt;            Column4.HeaderText = "Custom";&lt;br /&gt;            Column4.DataPropertyName = "IsCustom";&lt;br /&gt;            Column4.Name = "Column4";&lt;br /&gt;            Column4.DisplayIndex = 3;&lt;br /&gt;            Column4.Visible = false;&lt;br /&gt;            //Column4.DefaultCellStyle = dataGridViewCellStyle2;&lt;br /&gt;            // &lt;br /&gt;            // Column5&lt;br /&gt;            // &lt;br /&gt;            Column5.HeaderText = "Values";&lt;br /&gt;            Column5.DataPropertyName = "CustomValue";&lt;br /&gt;            Column5.Name = "Column5";&lt;br /&gt;            Column5.DefaultCellStyle = dataGridViewCellStyle2;&lt;br /&gt;            columnDestValueField.DisplayIndex = 4;&lt;br /&gt;            Column5.Visible = false;&lt;br /&gt;            // &lt;br /&gt;            // Column6&lt;br /&gt;            // &lt;br /&gt;            Column6.HeaderText = "Selection";&lt;br /&gt;            Column6.DataPropertyName = "IsFixed";&lt;br /&gt;            Column6.Name = "Column6";&lt;br /&gt;            Column6.DisplayIndex = 5;&lt;br /&gt;            Column6.Visible = false;&lt;br /&gt;            //Column6.DefaultCellStyle = dataGridViewCellStyle2;&lt;br /&gt;            // &lt;br /&gt;            // Column7&lt;br /&gt;            // &lt;br /&gt;&lt;br /&gt;            Column7.HeaderText = "CSV Source Fields";&lt;br /&gt;            Column7.DisplayMember = "DisplayValue";&lt;br /&gt;            Column7.ValueMember = "ValueMember";&lt;br /&gt;            Column7.DefaultCellStyle = dataGridViewCellStyle2;&lt;br /&gt;            Column7.DisplayIndex = 6;&lt;br /&gt;            Column7.Width = 200;&lt;br /&gt;            Column7.Name = "Column7";&lt;br /&gt;            ((System.ComponentModel.ISupportInitialize)(dataGridViewDetail)).EndInit();&lt;br /&gt;            windowsFormsHostDetail.Child = dataGridViewDetail;&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;thank you&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4751822682029543386-414477627205099388?l=netcodesnippet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netcodesnippet.blogspot.com/feeds/414477627205099388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netcodesnippet.blogspot.com/2009/04/create-complete-grid-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/414477627205099388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/414477627205099388'/><link rel='alternate' type='text/html' href='http://netcodesnippet.blogspot.com/2009/04/create-complete-grid-with.html' title='Create A Complete Grid with programmetrically in C#'/><author><name>RRave</name><uri>http://www.blogger.com/profile/02162942492813501463</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_XXhoLiK87qs/SeoObND7qDI/AAAAAAAAADo/ROkVa_JFjkY/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4751822682029543386.post-1414920181204174567</id><published>2009-04-18T09:26:00.001-07:00</published><updated>2009-04-18T09:42:34.692-07:00</updated><title type='text'>Get Directory Name from the File Path</title><content type='html'>Code Snippet:&lt;br /&gt;&lt;br /&gt;public string GetDirectoryNameFromPath(string fullPath)&lt;br /&gt;        {&lt;br /&gt;            return Path.GetDirectoryName(fullPath);&lt;br /&gt;        }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4751822682029543386-1414920181204174567?l=netcodesnippet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netcodesnippet.blogspot.com/feeds/1414920181204174567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netcodesnippet.blogspot.com/2009/04/get-directory-name-from-file-path.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/1414920181204174567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4751822682029543386/posts/default/1414920181204174567'/><link rel='alternate' type='text/html' href='http://netcodesnippet.blogspot.com/2009/04/get-directory-name-from-file-path.html' title='Get Directory Name from the File Path'/><author><name>RRave</name><uri>http://www.blogger.com/profile/02162942492813501463</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://4.bp.blogspot.com/_XXhoLiK87qs/SeoObND7qDI/AAAAAAAAADo/ROkVa_JFjkY/S220/profile.jpg'/></author><thr:total>0</thr:total></entry></feed>
