 




<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IT Answers &#187; DataGridView</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/tag/datagridview/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers</link>
	<description></description>
	<lastBuildDate>Tue, 21 May 2013 05:55:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>How to read Rows of a DatagridView through for loop</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-read-rows-of-a-datagridview-through-for-loop/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/how-to-read-rows-of-a-datagridview-through-for-loop/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 14:56:16 +0000</pubDate>
		<dc:creator>EhteshamSiddiqui</dc:creator>
				<category><![CDATA[DataGridView]]></category>
		<category><![CDATA[VB.NET 2008]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hi, My application is in VS2008 coded in Vb.net.I have a datagridview which is populated from Database.I have a save button on the same form that has DatagridView. My requirement is i want that all the records that are populated in DatagridView should be saved in a certain table of the database when the user [...]]]></description>
				<content:encoded><![CDATA[<p>Hi,<br />
My application is in VS2008 coded in Vb.net.I have a datagridview which is populated from Database.I have a save button on the same form that has DatagridView.<br />
My requirement is i want that all the records that are populated in DatagridView should be saved in a certain table of the database when the user clicks save.<br />
Im done with my save and Update code.What im not able to do is,im not able to increment the counter and move to the next row of datagridView when my For loop is executing after the click of Save button.<br />
Below is my Code.</p>
<div>
<pre></div>
<div>For i As Integer = 0 To DGVStudRecord.RowCount - 1</div>
<div>My code to Update And Save</div>
<div>Next</div>
<div>
</div>
<div>
</div>
<div>Here what is happening is when save button is clicked my for Loop is executing and looping till RowCount-1.But i want that after completion of each loop my i should get to the next row in the datagirdView.I should be able to get the values of next row to pass it to my controls that are carrying update and delete operation.<br />
The entire data in the datagridview will be saved in a certain table at the click of save button.<br />
Please suggest.</div>
<div>
</div>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/how-to-read-rows-of-a-datagridview-through-for-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use an object to travel data from one form to another</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-use-an-object-to-travel-data-from-one-form-to-another/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/how-to-use-an-object-to-travel-data-from-one-form-to-another/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 07:18:32 +0000</pubDate>
		<dc:creator>EhteshamSiddiqui</dc:creator>
				<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[DataGridView]]></category>
		<category><![CDATA[VB DataGrid]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[Visual Basic .NET]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hi, I have two forms.Both having DatagridView.There are two comboboxes to filter the record from Database and fill in Datagridview.My requirement is when all the data is populated in DataGrid after selecting the comboboxes and when the user clicks on Delete. The comboboxes and Datagrid on second form should have the same values as that [...]]]></description>
				<content:encoded><![CDATA[<div>Hi,</div>
<div>I have two forms.Both having DatagridView.There are two comboboxes to filter the record from Database and fill in Datagridview.My requirement is when all the data is populated in DataGrid after selecting the comboboxes and when the user clicks on Delete.</div>
<div>The comboboxes and Datagrid on second form should have the same values as that was on first form.The names of my Comboboxes and Datagridview are same on both the forms</div>
<div>Below is the code my Datagrid view getting populated in First Form.</div>
<div>
<pre>Sub GetData(ByVal StrQuery As String)</div>
<div>        If CBMedium.Text &lt;&gt; "" And CBClass.Text &lt;&gt; "" Then</div>
<div>            DGVStudRecord.Rows.Clear()</div>
<div>            con = DBConnect()</div>
<div>            cmd = New SqlCommand(StrQuery, con)</div>
<div>            dr = cmd.ExecuteReader</div>
<div>            If dr.HasRows Then</div>
<div>                While dr.Read</div>
<div>                  </div>
<div>                    DGVStudRecord.Rows.Add(dr(0), dr(1), dr(2), dr(3), dr(4), dr(5))</div>
<div>                End While</div>
<div>            End If</div>
<div>            con.Close()</div>
<div>        </div>
<div>        End If</div>
<div>    End Sub</pre>
</div>
<div>Please suggest how can i populate my datagrid in second form by using the Data populated in Datagrid of Firrt Form</div>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/how-to-use-an-object-to-travel-data-from-one-form-to-another/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MaskedTextBox in DataGridView</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/maskedtextbox-in-datagridview/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/maskedtextbox-in-datagridview/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 09:40:16 +0000</pubDate>
		<dc:creator>Pkaur</dc:creator>
				<category><![CDATA[DataGridView]]></category>
		<category><![CDATA[TextBox]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[Visual Basic 2005]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[How to do add MaskedTextBox into column of DaTaGridView??]]></description>
				<content:encoded><![CDATA[<p>How to do add MaskedTextBox into column of DaTaGridView??</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/maskedtextbox-in-datagridview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>To Access the details from gridview all row single cell</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/to-access-the-details-from-gridview-all-row-single-cell/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/to-access-the-details-from-gridview-all-row-single-cell/#comments</comments>
		<pubDate>Tue, 08 Mar 2011 11:13:41 +0000</pubDate>
		<dc:creator>MEHRA</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.NET 3.5]]></category>
		<category><![CDATA[DataGridView]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hi friends, I have one gridview in which I bindinig data ,in gridview I have four BoundField  and one template field in template field I put Insert Item template which contains Textbox . What is my requrement ? at the submit button click I want access all Textbox value and store into Database. If anybody [...]]]></description>
				<content:encoded><![CDATA[<p>Hi friends,<br />
I have one gridview in which I bindinig data ,in gridview I have four <b>BoundField</b>  and one template field in template field I put Insert Item template which contains Textbox .<br />
What is my requrement ?<br />
at the submit button click I want access all Textbox value and store into Database.<br />
If anybody has solutiuon then please share it &#8230;&#8230;..<br />
Thanks</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/to-access-the-details-from-gridview-all-row-single-cell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limiting character input in specific cells on a DataGridView in Visual Basic.</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/limiting-character-input-in-specific-cells-on-a-datagridview-in-visual-basic/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/limiting-character-input-in-specific-cells-on-a-datagridview-in-visual-basic/#comments</comments>
		<pubDate>Sun, 20 Feb 2011 03:34:12 +0000</pubDate>
		<dc:creator>Trueheartless</dc:creator>
				<category><![CDATA[DataGridView]]></category>
		<category><![CDATA[VB 2008]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[Visual Basic 2008]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I&#8217;m making a gradebook program (for a project) but I haven&#8217;t touched VB in years. Given it is a simple language, there&#8217;s still plenty of things I don&#8217;t know about it.  At the moment I&#8217;m trying to figure out how to limit the characters a user is allowed to input in each specific cell (20) in a [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m making a gradebook program (for a project) but I haven&#8217;t touched VB in years. Given it is a simple language, there&#8217;s still plenty of things I don&#8217;t know about it. </p>
<div>	At the moment I&#8217;m trying to figure out how to limit the characters a user is allowed to input in each specific cell (20) in a DataGridView.  (I&#8217;ll also need to figure out how to limit the input to numbers only, but that&#8217;s something different right now.)</div>
<div>	Any assistance is greatly appreciated.</div>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/limiting-character-input-in-specific-cells-on-a-datagridview-in-visual-basic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to populate datagrid using store procedure</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-populate-datagrid-using-store-procedure/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/how-to-populate-datagrid-using-store-procedure/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 22:20:09 +0000</pubDate>
		<dc:creator>Implicitcherry</dc:creator>
				<category><![CDATA[DataGridView]]></category>
		<category><![CDATA[Stored Procedures]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[Visual Basic developers]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[m trying to populate a datagridview using a store procedure called from  a module but it is givign me some problem as in my module i use the Function as a bindingsource can someone help me here im totally lost]]></description>
				<content:encoded><![CDATA[<p>m trying to populate a datagridview using a store procedure called from  a module but it is givign me some problem as in my module i use the Function as a bindingsource can someone help me here im totally lost</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/how-to-populate-datagrid-using-store-procedure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Formview from gridview in Visual Basic</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/formview-fom-gridview/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/formview-fom-gridview/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 15:01:33 +0000</pubDate>
		<dc:creator>Rafik</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[DataGridView]]></category>
		<category><![CDATA[GridView]]></category>
		<category><![CDATA[VB]]></category>
		<category><![CDATA[Visual Basic]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[How does one automate by clicking a row in gridview to show a form populated with the clicked row data in visual basic for windows not asp.net]]></description>
				<content:encoded><![CDATA[<p>How does one automate by clicking a row in gridview to show a form populated with the clicked row data in visual basic for windows not asp.net</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/formview-fom-gridview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gridview data in ASP.NET data table</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/girdview-data-in-datatable/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/girdview-data-in-datatable/#comments</comments>
		<pubDate>Sat, 11 Dec 2010 11:09:58 +0000</pubDate>
		<dc:creator>Jyoti1986</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[DataGridView]]></category>
		<category><![CDATA[GridView]]></category>
		<category><![CDATA[GridView Control]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[how to get data in DataTable from gridview contain template column as textbox?the Datatable should contain the value enter in template column   I used DataTable dtData=((DataView)GridView1.DataSource).Table;   but given error as object reference not set for textbox in grid]]></description>
				<content:encoded><![CDATA[<p>how to get data in DataTable from gridview contain template column as textbox?the Datatable should contain the value enter in template column<br/><br/>  <br/><br/> I used <br/><br/> DataTable dtData=((DataView)GridView1.DataSource).Table;<br/><br/>  <br/><br/> but given error as object reference not set for textbox in grid<br/><br/></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/girdview-data-in-datatable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Datagridview First Rows Not Consider or Skip</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/datagridview-first-rows-not-consider-or-skip-2/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/datagridview-first-rows-not-consider-or-skip-2/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 14:42:49 +0000</pubDate>
		<dc:creator>Maheshwag</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[DataGridView]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2005]]></category>
		<category><![CDATA[VS 2005]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[There is some mistake from my previous question hence once again repeat it. My problem is on datagridview i have populate combobox and amount column. and ColumnHeader/RowHeaderVisible property set to false. I have coding as below. private void dataGridView1_RowLeave(object sender, DataGridViewCellEventArgs e)         {             double dd = 1.768901; [...]]]></description>
				<content:encoded><![CDATA[<p>There is some mistake from my previous question hence once again repeat it.</p>
<div></div>
<div>My problem is on datagridview i have populate combobox and amount column. and ColumnHeader/RowHeaderVisible property set to false. I have coding as below.</div>
<div>
<pre></div>
<div></div>
<div>private void dataGridView1_RowLeave(object sender, DataGridViewCellEventArgs e)</div>
<div>
<div>        {</div>
<div>            double dd = 1.768901;</div>
<div>            dd = Convert.ToDouble(dd.ToString("f2"));</div>
<div>            DataGridViewCellStyle fixedstyle = new DataGridViewCellStyle();</div>
<div>            fixedstyle.Format = "f2";</div>
<div>            dataGridView1.Columns[1].DefaultCellStyle = fixedstyle;</div>
<div></div>
<div>            try</div>
<div>            {</div>
<div>                decimal sum = 0.00m;</div>
<div></div>
<div>                for (int i = 0; i &lt; dataGridView1.Rows.Count - 1; i++)</div>
<div>                    if (dataGridView1[1, I].Value != DBNull.Value)</div>
<div>                    {</div>
<div>                        sum = sum +			Convert.ToDecimal(dataGridView1[1,I].Value);</div>
<div>                        label12.Text = sum.ToString("f2");</div>
<div></div>
<div>                    }</div>
<div></div>
<div>            }</div>
<div></div>
<div>            catch (Exception ex)</div>
<div>            {</div>
<div>                MessageBox.Show(ex.Message);</div>
<div>            }</div>
<div>        }</div>
</div>
<div></pre>
</div>
<div></div>
<div>My problem is total not counted from begining of the column&#8217;s rows &#8220;ammount&#8221;.</div>
<div></div>
<div>e.g&#8230;</div>
<div></div>
<div>1st rows         column value=12</div>
<div>2nd rows        column value=12</div>
<div>3rows            column value= 12</div>
<div></div>
<div>total of column shows is 24 where as actual columns value is 36.</div>
<div></div>
<div>I think first rows column&#8217;s total not consider or skip. how to solve it.</div>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/datagridview-first-rows-not-consider-or-skip-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to update a row in grid view?</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-update-a-row-in-grid-view/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/how-to-update-a-row-in-grid-view/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 11:09:31 +0000</pubDate>
		<dc:creator>Santu101525</dc:creator>
				<category><![CDATA[Access]]></category>
		<category><![CDATA[DataGridView]]></category>
		<category><![CDATA[GridView]]></category>
		<category><![CDATA[GridView RowUpdating]]></category>
		<category><![CDATA[VB .NET]]></category>
		<category><![CDATA[Visual Basic .NET]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[how to update a row in grid view when changes made to database..]]></description>
				<content:encoded><![CDATA[<p>how to update a row in grid view when changes made to database..</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/how-to-update-a-row-in-grid-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/9 queries in 0.012 seconds using memcached
Object Caching 922/923 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-21 06:18:48 -->