<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for KaushaL.NET</title>
	<atom:link href="http://kaushalparik.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://kaushalparik.wordpress.com</link>
	<description>{ a .net developer's blog; }</description>
	<lastBuildDate>Mon, 04 May 2009 11:50:05 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Core ASP.NET Card, Get it Free by Kaushal</title>
		<link>http://kaushalparik.wordpress.com/2009/05/04/core-aspnet-card-get-it-free/#comment-8</link>
		<dc:creator>Kaushal</dc:creator>
		<pubDate>Mon, 04 May 2009 11:50:05 +0000</pubDate>
		<guid isPermaLink="false">http://kaushalparik.wordpress.com/?p=133#comment-8</guid>
		<description>Check out here &gt; http://dotnetslackers.com/Community/blogs/kaushalparik/rc046-010d-core_asp_net.zip</description>
		<content:encoded><![CDATA[<p>Check out here &gt; <a href="http://dotnetslackers.com/Community/blogs/kaushalparik/rc046-010d-core_asp_net.zip" rel="nofollow">http://dotnetslackers.com/Community/blogs/kaushalparik/rc046-010d-core_asp_net.zip</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Core ASP.NET Card, Get it Free by Virendra Dugar</title>
		<link>http://kaushalparik.wordpress.com/2009/05/04/core-aspnet-card-get-it-free/#comment-7</link>
		<dc:creator>Virendra Dugar</dc:creator>
		<pubDate>Mon, 04 May 2009 10:45:51 +0000</pubDate>
		<guid isPermaLink="false">http://kaushalparik.wordpress.com/?p=133#comment-7</guid>
		<description>Can you please upload the .PDF version on your blog of the same?</description>
		<content:encoded><![CDATA[<p>Can you please upload the .PDF version on your blog of the same?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on asp:Menu Server Control &#8211; Cross Browser Compatibility (Safari/Chrome) by grohitk</title>
		<link>http://kaushalparik.wordpress.com/2009/03/16/aspmenu-server-control-cross-browser-compatibility-safarichrome/#comment-6</link>
		<dc:creator>grohitk</dc:creator>
		<pubDate>Mon, 13 Apr 2009 07:19:58 +0000</pubDate>
		<guid isPermaLink="false">http://kaushalparik.wordpress.com/?p=127#comment-6</guid>
		<description>Hi Dear 
 how can i di cmpatible with firfox 3.0 or latest versions.
please help.</description>
		<content:encoded><![CDATA[<p>Hi Dear<br />
 how can i di cmpatible with firfox 3.0 or latest versions.<br />
please help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on asp:Menu Server Control &#8211; Cross Browser Compatibility (Safari/Chrome) by grohitk</title>
		<link>http://kaushalparik.wordpress.com/2009/03/16/aspmenu-server-control-cross-browser-compatibility-safarichrome/#comment-5</link>
		<dc:creator>grohitk</dc:creator>
		<pubDate>Mon, 13 Apr 2009 07:17:44 +0000</pubDate>
		<guid isPermaLink="false">http://kaushalparik.wordpress.com/?p=127#comment-5</guid>
		<description>Thanks....It is Very Helpfull for me</description>
		<content:encoded><![CDATA[<p>Thanks&#8230;.It is Very Helpfull for me</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on (CheckBox in HeaderTemplate to) Select All CheckBoxes inside a GridView using JavaScript by desideveloper</title>
		<link>http://kaushalparik.wordpress.com/2008/07/16/checkbox-in-headertemplate-to-select-all-checkboxes-inside-a-gridview-using-javascript/#comment-3</link>
		<dc:creator>desideveloper</dc:creator>
		<pubDate>Wed, 06 Aug 2008 10:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://kaushalparik.wordpress.com/?p=35#comment-3</guid>
		<description>Hi.
Thanks for the article.

I am having a problem with implementing the code on my side. My page is contained in a Master Page.

The Javascript generated on the page
//&lt;![CDATA[
function SelectAll(Rows,GridName,SelectAll)
{
	 TotalChkBx = parseInt(Rows);
	 var TargetBaseControl = document.getElementById(GridName);
	 var TargetChildControl = &quot;chkSelect&quot;; 
	 var Inputs = TargetBaseControl.getElementsByTagName(&quot;input&quot;);
	 for(var iCount = 0; iCount = 0)
			 Inputs[iCount].checked = document.getElementById(SelectAll).checked;
	 }
}
//]]&gt;


and the grid part that makes use of the script is:


		

			
                                                                    

And the code behind is:

[code]
protected void Page_Load(object sender, EventArgs e)
{
            if (!Page.IsPostBack)
            {
                LoadMandatesList();
            }
            if (!Page.ClientScript.IsClientScriptBlockRegistered(&quot;MandateSelectAll&quot;))
            {
                string strScript = Global.GetSelectAllScript();
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), &quot;MandateSelectAll&quot;, strScript, true);
            } //I have also tried it by putting this in the code-behind of the master page 
}
protected void LoadMandatesList()
{
            BindMandateList(0);
}
private void BindMandateList(int intNewPageIndex)
        {
            g_dtMandatesList = (GlobalVariables.g_AccessLevel == 1 &#124;&#124; GlobalVariables.g_AccessLevel == 2) ?
                Mandate.GetMandatesList(g_AgencyID) : Mandate.GetMandatesList(g_AgencyID, g_AgentID);
            Global.BindGridView(ref grdMandatesList, g_dtMandatesList, intNewPageIndex);
        }

protected void grdMandatesList_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.Header)
            {
                string strGridName = grdMandatesList.ClientID, strSelectAll = ((CheckBox)e.Row.FindControl(&quot;chkSelectAll&quot;)).ClientID;
                string strJavascript = &quot;javascript:SelectAll(&quot; + g_dtMandatesList.Rows.Count + &quot;,&quot; + strGridName + &quot;,&quot; + strSelectAll + &quot;)&quot;;
                ((CheckBox)e.Row.FindControl(&quot;chkSelectAll&quot;)).Attributes.Add(&quot;onclick&quot;, strJavascript);
            }
}

public static string GetSelectAllScript(int intRows)
        {
            StringBuilder strRefreshScript = new StringBuilder();
            strRefreshScript.Append(&quot;function SelectAll(Rows,GridName,SelectAll)\n&quot;);
            strRefreshScript.Append(&quot;{\n&quot;);
            strRefreshScript.Append(&quot;\t TotalChkBx = parseInt(Rows);\n&quot;);
            strRefreshScript.Append(&quot;\t var TargetBaseControl = document.getElementById(GridName);\n&quot;);
            strRefreshScript.Append(&quot;\t var TargetChildControl = \&quot;chkSelect\&quot;; \n&quot;);
            strRefreshScript.Append(&quot;\t var Inputs = TargetBaseControl.getElementsByTagName(\&quot;input\&quot;);\n&quot;);
            strRefreshScript.Append(&quot;\t for(var iCount = 0; iCount = 0)\n&quot;);
            strRefreshScript.Append(&quot;\t\t\t Inputs[iCount].checked = document.getElementById(SelectAll).checked;\n&quot;);
            strRefreshScript.Append(&quot;\t }\n&quot;);
            strRefreshScript.Append(&quot;}\n&quot;);
            return strRefreshScript.ToString();
        }
[/code]

Please help me figure out what could be wrong with my code.

Thanks a stack.</description>
		<content:encoded><![CDATA[<p>Hi.<br />
Thanks for the article.</p>
<p>I am having a problem with implementing the code on my side. My page is contained in a Master Page.</p>
<p>The Javascript generated on the page<br />
//&lt;![CDATA[<br />
function SelectAll(Rows,GridName,SelectAll)<br />
{<br />
	 TotalChkBx = parseInt(Rows);<br />
	 var TargetBaseControl = document.getElementById(GridName);<br />
	 var TargetChildControl = "chkSelect";<br />
	 var Inputs = TargetBaseControl.getElementsByTagName("input");<br />
	 for(var iCount = 0; iCount = 0)<br />
			 Inputs[iCount].checked = document.getElementById(SelectAll).checked;<br />
	 }<br />
}<br />
//]]&gt;</p>
<p>and the grid part that makes use of the script is:</p>
<p>And the code behind is:</p>
<pre class="brush: plain;">
protected void Page_Load(object sender, EventArgs e)
{
            if (!Page.IsPostBack)
            {
                LoadMandatesList();
            }
            if (!Page.ClientScript.IsClientScriptBlockRegistered("MandateSelectAll"))
            {
                string strScript = Global.GetSelectAllScript();
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MandateSelectAll", strScript, true);
            } //I have also tried it by putting this in the code-behind of the master page
}
protected void LoadMandatesList()
{
            BindMandateList(0);
}
private void BindMandateList(int intNewPageIndex)
        {
            g_dtMandatesList = (GlobalVariables.g_AccessLevel == 1 || GlobalVariables.g_AccessLevel == 2) ?
                Mandate.GetMandatesList(g_AgencyID) : Mandate.GetMandatesList(g_AgencyID, g_AgentID);
            Global.BindGridView(ref grdMandatesList, g_dtMandatesList, intNewPageIndex);
        }

protected void grdMandatesList_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.Header)
            {
                string strGridName = grdMandatesList.ClientID, strSelectAll = ((CheckBox)e.Row.FindControl("chkSelectAll")).ClientID;
                string strJavascript = "javascript:SelectAll(" + g_dtMandatesList.Rows.Count + "," + strGridName + "," + strSelectAll + ")";
                ((CheckBox)e.Row.FindControl("chkSelectAll")).Attributes.Add("onclick", strJavascript);
            }
}

public static string GetSelectAllScript(int intRows)
        {
            StringBuilder strRefreshScript = new StringBuilder();
            strRefreshScript.Append("function SelectAll(Rows,GridName,SelectAll)\n");
            strRefreshScript.Append("{\n");
            strRefreshScript.Append("\t TotalChkBx = parseInt(Rows);\n");
            strRefreshScript.Append("\t var TargetBaseControl = document.getElementById(GridName);\n");
            strRefreshScript.Append("\t var TargetChildControl = \"chkSelect\"; \n");
            strRefreshScript.Append("\t var Inputs = TargetBaseControl.getElementsByTagName(\"input\");\n");
            strRefreshScript.Append("\t for(var iCount = 0; iCount = 0)\n");
            strRefreshScript.Append("\t\t\t Inputs[iCount].checked = document.getElementById(SelectAll).checked;\n");
            strRefreshScript.Append("\t }\n");
            strRefreshScript.Append("}\n");
            return strRefreshScript.ToString();
        }
</pre>
<p>Please help me figure out what could be wrong with my code.</p>
<p>Thanks a stack.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on (CheckBox in HeaderTemplate to) Select All CheckBoxes inside a GridView using JavaScript by dhwanilpandya</title>
		<link>http://kaushalparik.wordpress.com/2008/07/16/checkbox-in-headertemplate-to-select-all-checkboxes-inside-a-gridview-using-javascript/#comment-2</link>
		<dc:creator>dhwanilpandya</dc:creator>
		<pubDate>Fri, 25 Jul 2008 12:29:44 +0000</pubDate>
		<guid isPermaLink="false">http://kaushalparik.wordpress.com/?p=35#comment-2</guid>
		<description>hi Kaushal, i have gone through your blog of select header checkbox in grid when checkboxes in each of the row is selected, Its a Great stuff , Helped me when i stuked in it. but there is one problem it is not working when there is only one row is in the grid... when we select checkbox in first row headrer checkbox is not getting selected . . .
can you help me out????
- Dhwanil</description>
		<content:encoded><![CDATA[<p>hi Kaushal, i have gone through your blog of select header checkbox in grid when checkboxes in each of the row is selected, Its a Great stuff , Helped me when i stuked in it. but there is one problem it is not working when there is only one row is in the grid&#8230; when we select checkbox in first row headrer checkbox is not getting selected . . .<br />
can you help me out????<br />
- Dhwanil</p>
]]></content:encoded>
	</item>
</channel>
</rss>
