<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: C# ASP.NET &#8211; GridView : How to Use Checkbox in Gridview to Select Multiple Rows</title>
	<atom:link href="http://www.ilearnttoday.com/c-aspnet-gridview-select-multiple-rows-in-a-grid-view-using-check-boxes/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ilearnttoday.com/c-aspnet-gridview-select-multiple-rows-in-a-grid-view-using-check-boxes</link>
	<description>This is where I share what I learn day by day...</description>
	<lastBuildDate>Fri, 27 Jan 2012 02:06:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: argon</title>
		<link>http://www.ilearnttoday.com/c-aspnet-gridview-select-multiple-rows-in-a-grid-view-using-check-boxes#comment-4105</link>
		<dc:creator>argon</dc:creator>
		<pubDate>Thu, 12 Jan 2012 17:05:21 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=221#comment-4105</guid>
		<description>Tnx brd</description>
		<content:encoded><![CDATA[<p>Tnx brd</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JayPrakash Sharma</title>
		<link>http://www.ilearnttoday.com/c-aspnet-gridview-select-multiple-rows-in-a-grid-view-using-check-boxes#comment-4083</link>
		<dc:creator>JayPrakash Sharma</dc:creator>
		<pubDate>Thu, 05 Jan 2012 11:21:16 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=221#comment-4083</guid>
		<description>Very informative post. It&#039;s really helpful for me and helped me lot to complete my task. Thanks for sharing with us. I had found another nice post over the internet which was also explained very well about Populate Grid Control From XML Document Easily, for more details of this post check out this link...

http://mindstick.com/Articles/6c3ccf8c-6656-4a48-bfb7-e0221569de67/?Populate%20Grid%20Control%20From%20XML%20Document%20Easily

Thanks Everyone!!</description>
		<content:encoded><![CDATA[<p>Very informative post. It&#8217;s really helpful for me and helped me lot to complete my task. Thanks for sharing with us. I had found another nice post over the internet which was also explained very well about Populate Grid Control From XML Document Easily, for more details of this post check out this link&#8230;</p>
<p><a href="http://mindstick.com/Articles/6c3ccf8c-6656-4a48-bfb7-e0221569de67/?Populate%20Grid%20Control%20From%20XML%20Document%20Easily" rel="nofollow">http://mindstick.com/Articles/6c3ccf8c-6656-4a48-bfb7-e0221569de67/?Populate%20Grid%20Control%20From%20XML%20Document%20Easily</a></p>
<p>Thanks Everyone!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leqid</title>
		<link>http://www.ilearnttoday.com/c-aspnet-gridview-select-multiple-rows-in-a-grid-view-using-check-boxes#comment-3841</link>
		<dc:creator>leqid</dc:creator>
		<pubDate>Fri, 11 Nov 2011 15:39:44 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=221#comment-3841</guid>
		<description>Thank you! Just the thing.</description>
		<content:encoded><![CDATA[<p>Thank you! Just the thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrea</title>
		<link>http://www.ilearnttoday.com/c-aspnet-gridview-select-multiple-rows-in-a-grid-view-using-check-boxes#comment-3330</link>
		<dc:creator>Andrea</dc:creator>
		<pubDate>Mon, 05 Sep 2011 19:13:21 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=221#comment-3330</guid>
		<description>Thaks!!!!!!

^^</description>
		<content:encoded><![CDATA[<p>Thaks!!!!!!</p>
<p>^^</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sachin</title>
		<link>http://www.ilearnttoday.com/c-aspnet-gridview-select-multiple-rows-in-a-grid-view-using-check-boxes#comment-3293</link>
		<dc:creator>sachin</dc:creator>
		<pubDate>Sun, 28 Aug 2011 20:21:23 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=221#comment-3293</guid>
		<description>hey menol... what to do if one wants to create checkbox with integer values not bool values? it shows error on browser...
pls suggest something..... :)</description>
		<content:encoded><![CDATA[<p>hey menol&#8230; what to do if one wants to create checkbox with integer values not bool values? it shows error on browser&#8230;<br />
pls suggest something&#8230;.. <img src='http://www.ilearnttoday.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abhinav</title>
		<link>http://www.ilearnttoday.com/c-aspnet-gridview-select-multiple-rows-in-a-grid-view-using-check-boxes#comment-35</link>
		<dc:creator>abhinav</dc:creator>
		<pubDate>Mon, 01 Mar 2010 18:44:17 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=221#comment-35</guid>
		<description>hi menol, i have a problem when i want to insert the check box column(which is selected by user) in the grid view into the database .my code looks like:- 
---------------------------------------------------------------

 protected void Button1_Click(object sender, EventArgs e)
        {
           
           
            ArrayList names = new ArrayList();  
foreach (GridViewRow gvr in this.GridView1.Rows)  
{  
if (((CheckBox)gvr.FindControl(&quot;c&quot;)).Checked == true)  
{  
names.Add( gvr.Cells[0].Text);


}  
}  
  
//this.Label2.Text = string.Empty;  
foreach (object itm in names)  
{  
this.Label2.Text +=itm.ToString();
    SqlDataAdapter dal = new SqlDataAdapter(&quot;select projectid from tblproject where projectname=&#039;&quot;+itm.ToString()+&quot;&#039; &quot;, abhiconnectionstring);
    DataSet ds = new DataSet();
    dal.Fill(ds);
    int s = int.Parse(ds.Tables[0].Rows[0][0].ToString());
    
    abhiconnectionstring.Open();
    SqlCommand cmd = new SqlCommand(&quot;insert into tbltechskill (personid,projectid) values(&#039;&quot; + TextBox3.Text.ToString() + &quot;&#039;,&#039;&quot; +s+ &quot;&#039;) &quot;, abhiconnectionstring);
    cmd.ExecuteNonQuery();
    abhiconnectionstring.Close();
   // Response.Redirect(&quot;project.aspx&quot;);
}  
 ------------------------------------------------------------but the problem is , selected checkbox value are not coming into the object itm i.e (itm.string()) ..........can you please help me</description>
		<content:encoded><![CDATA[<p>hi menol, i have a problem when i want to insert the check box column(which is selected by user) in the grid view into the database .my code looks like:-<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p> protected void Button1_Click(object sender, EventArgs e)<br />
        {</p>
<p>            ArrayList names = new ArrayList();<br />
foreach (GridViewRow gvr in this.GridView1.Rows)<br />
{<br />
if (((CheckBox)gvr.FindControl(&#8220;c&#8221;)).Checked == true)<br />
{<br />
names.Add( gvr.Cells[0].Text);</p>
<p>}<br />
}  </p>
<p>//this.Label2.Text = string.Empty;<br />
foreach (object itm in names)<br />
{<br />
this.Label2.Text +=itm.ToString();<br />
    SqlDataAdapter dal = new SqlDataAdapter(&#8220;select projectid from tblproject where projectname=&#8217;&#8221;+itm.ToString()+&#8221;&#8216; &#8220;, abhiconnectionstring);<br />
    DataSet ds = new DataSet();<br />
    dal.Fill(ds);<br />
    int s = int.Parse(ds.Tables[0].Rows[0][0].ToString());</p>
<p>    abhiconnectionstring.Open();<br />
    SqlCommand cmd = new SqlCommand(&#8220;insert into tbltechskill (personid,projectid) values(&#8216;&#8221; + TextBox3.Text.ToString() + &#8220;&#8216;,&#8217;&#8221; +s+ &#8220;&#8216;) &#8220;, abhiconnectionstring);<br />
    cmd.ExecuteNonQuery();<br />
    abhiconnectionstring.Close();<br />
   // Response.Redirect(&#8220;project.aspx&#8221;);<br />
}<br />
 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;but the problem is , selected checkbox value are not coming into the object itm i.e (itm.string()) &#8230;&#8230;&#8230;.can you please help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: napster</title>
		<link>http://www.ilearnttoday.com/c-aspnet-gridview-select-multiple-rows-in-a-grid-view-using-check-boxes#comment-34</link>
		<dc:creator>napster</dc:creator>
		<pubDate>Wed, 18 Nov 2009 12:26:17 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=221#comment-34</guid>
		<description>Hey Menol,

Nice code ..
thanks</description>
		<content:encoded><![CDATA[<p>Hey Menol,</p>
<p>Nice code ..<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nishant</title>
		<link>http://www.ilearnttoday.com/c-aspnet-gridview-select-multiple-rows-in-a-grid-view-using-check-boxes#comment-33</link>
		<dc:creator>Nishant</dc:creator>
		<pubDate>Mon, 03 Aug 2009 07:34:34 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=221#comment-33</guid>
		<description>Good work Menol. 
Thanks for helping us all :)</description>
		<content:encoded><![CDATA[<p>Good work Menol.<br />
Thanks for helping us all <img src='http://www.ilearnttoday.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raushan</title>
		<link>http://www.ilearnttoday.com/c-aspnet-gridview-select-multiple-rows-in-a-grid-view-using-check-boxes#comment-32</link>
		<dc:creator>raushan</dc:creator>
		<pubDate>Tue, 21 Jul 2009 22:23:55 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=221#comment-32</guid>
		<description>what is the mistake?
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    
    protected void Button1_Click(object sender, EventArgs e)
    {
        CheckBox ch;
        for (i = 0; i &lt; GridView.Rows.Count; i++)
        {
            ch = GridView1.Rows[i].FindControl(&quot;chk&quot;);
            
                if(ch.Checked==true)
                {
                    Response.Write(ch.Text + &quot;&quot;);
            }
        }
    }
}</description>
		<content:encoded><![CDATA[<p>what is the mistake?<br />
using System;<br />
using System.Configuration;<br />
using System.Data;<br />
using System.Linq;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.HtmlControls;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Xml.Linq;</p>
<p>public partial class _Default : System.Web.UI.Page<br />
{<br />
    protected void Page_Load(object sender, EventArgs e)<br />
    {</p>
<p>    }</p>
<p>    protected void Button1_Click(object sender, EventArgs e)<br />
    {<br />
        CheckBox ch;<br />
        for (i = 0; i &lt; GridView.Rows.Count; i++)<br />
        {<br />
            ch = GridView1.Rows[i].FindControl(&#8220;chk&#8221;);</p>
<p>                if(ch.Checked==true)<br />
                {<br />
                    Response.Write(ch.Text + &#8220;&#8221;);<br />
            }<br />
        }<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hayek</title>
		<link>http://www.ilearnttoday.com/c-aspnet-gridview-select-multiple-rows-in-a-grid-view-using-check-boxes#comment-31</link>
		<dc:creator>hayek</dc:creator>
		<pubDate>Tue, 23 Jun 2009 14:48:24 +0000</pubDate>
		<guid isPermaLink="false">http://ilearnttoday.wordpress.com/?p=221#comment-31</guid>
		<description>hello...
can we do this dynamically?i.e.
i get all tables from my database (SQL 2005) and i put them now in data tables (it a dataset)
now how we can dynamically show these tables in a gridviews with checkboxes (each table has it&#039;s own gridview)</description>
		<content:encoded><![CDATA[<p>hello&#8230;<br />
can we do this dynamically?i.e.<br />
i get all tables from my database (SQL 2005) and i put them now in data tables (it a dataset)<br />
now how we can dynamically show these tables in a gridviews with checkboxes (each table has it&#8217;s own gridview)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

