<?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>UC&#039;s Corner &#187; repeater</title>
	<atom:link href="http://yussi.nl/index.php/tag/repeater/feed" rel="self" type="application/rss+xml" />
	<link>http://yussi.nl</link>
	<description>Yussi Ariefiyono</description>
	<lastBuildDate>Fri, 24 Jun 2011 13:08:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>modify Visible function in repeater of gridview control</title>
		<link>http://yussi.nl/index.php/modify-visible-function-in-repeater-of-gridview-control.html</link>
		<comments>http://yussi.nl/index.php/modify-visible-function-in-repeater-of-gridview-control.html#comments</comments>
		<pubDate>Thu, 31 Dec 2009 12:18:00 +0000</pubDate>
		<dc:creator>yussi ariefiyono</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[gridview]]></category>
		<category><![CDATA[repeater]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">/post/modify-Visible-function-in-repeater-of-gridview-control.aspx</guid>
		<description><![CDATA[Problem: display label with the text full if the current field equal to zero in repeater or gridview Solution: &#60;asp:Label ID=&#8221;Label1&#8243; runat=&#8221;server&#8221; Text=&#8221;Full&#8221; ForeColor=&#8221;Red&#8221; Visible=&#8217;&#60;%# Convert.ToBoolean(Eval(&#8220;name of your field&#8221;).ToString().Equals(&#8220;0&#8243;)? &#8220;true&#8221;:&#8221;false&#8221;) %&#62;&#8217;&#62;]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong><br />
display label with the text full if the current field equal to zero in repeater or gridview</p>
<p><strong>Solution:</strong><br />
&lt;asp:Label ID=&#8221;Label1&#8243; runat=&#8221;server&#8221; Text=&#8221;Full&#8221; ForeColor=&#8221;Red&#8221; Visible=&#8217;&lt;%# Convert.ToBoolean(Eval(&#8220;name of your field&#8221;).ToString().Equals(&#8220;0&#8243;)? &#8220;true&#8221;:&#8221;false&#8221;) %&gt;&#8217;&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://yussi.nl/index.php/modify-visible-function-in-repeater-of-gridview-control.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Repeater inside repeater asp net</title>
		<link>http://yussi.nl/index.php/repeater-inside-repeater-asp-net.html</link>
		<comments>http://yussi.nl/index.php/repeater-inside-repeater-asp-net.html#comments</comments>
		<pubDate>Tue, 09 Jun 2009 17:28:00 +0000</pubDate>
		<dc:creator>yussi ariefiyono</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[repeater]]></category>

		<guid isPermaLink="false">/post/Repeater-inside-repeater-asp-net.aspx</guid>
		<description><![CDATA[Problem : Putting repeater inside repeater and take ID of parent repeater to bind the&#160; datasourse. Solution: hereby the example of code: in .aspx &#60;asp:Repeater ID=&#34;Repeater2&#34; runat=&#34;server&#34; &#160;&#160;&#160; onitemdatabound=&#34;Repeater2_ItemDataBound&#34;&#62; &#160;&#160;&#160; &#60;ItemTemplate&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;asp:Label ID=&#34;Label2&#34; runat=&#34;server&#34; Text=&#39;&#60;%# Eval(&#34;Tag&#34;) %&#62;&#39;&#62;&#60;/asp:Label&#62;&#60;/asp:HyperLink&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;asp:Repeater ID=&#34;Repeater1&#34; runat=&#34;server&#34;&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;ItemTemplate&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; (&#60;asp:Label ID=&#34;CountID&#34; runat=&#34;server&#34; Text=&#39;&#60;%# Eval(&#34;Expr1&#34;) %&#62;&#39;&#62;&#60;/asp:Label&#62;) &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/ItemTemplate&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/asp:Repeater&#62;]]></description>
			<content:encoded><![CDATA[<p>
<strong>Problem :</strong>
</p>
<p>
Putting repeater inside repeater and take ID of parent repeater to bind the&nbsp; datasourse.
</p>
<p>
<strong>Solution: </strong><br />
hereby the example of code:</p>
<p><strong>in .aspx</strong><br />
&lt;asp:Repeater ID=&quot;<strong>Repeater2</strong>&quot; runat=&quot;server&quot; <br />
&nbsp;&nbsp;&nbsp; onitemdatabound=&quot;Repeater2_ItemDataBound&quot;&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;ItemTemplate&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;asp:Label ID=&quot;Label2&quot; runat=&quot;server&quot; Text=&#39;&lt;%# Eval(&quot;Tag&quot;) %&gt;&#39;&gt;&lt;/asp:Label&gt;&lt;/asp:HyperLink&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;asp:Repeater ID=&quot;<strong>Repeater1</strong>&quot; runat=&quot;server&quot;&gt; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ItemTemplate&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&lt;asp:Label ID=&quot;CountID&quot; runat=&quot;server&quot; Text=&#39;&lt;%# Eval(&quot;Expr1&quot;) %&gt;&#39;&gt;&lt;/asp:Label&gt;)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ItemTemplate&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/asp:Repeater&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;br /&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/ItemTemplate&gt;<br />
&lt;/asp:Repeater&gt;
</p>
<p>
<strong>in .aspx cs </strong>
</p>
<p>
private DataTable getDataTableforRepeater2(int TagID)<br />
&nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SqlConnection conn = new SqlConnection();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; conn.ConnectionString = ConfigurationManager.ConnectionStrings[&quot;yourconnectionName&quot;].ConnectionString;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SqlCommand command = new SqlCommand();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; command.Connection = conn;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; command.CommandText = &quot;sql command&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataTable t = new DataTable();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SqlDataAdapter adapter = new SqlDataAdapter();</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; adapter.SelectCommand = command;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; adapter.Fill(t);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return t;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; protected void Repeater2_ItemDataBound(object sender, RepeaterItemEventArgs e)<br />
&nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Repeater Repeater1 = e.Item.FindControl(&quot;Repeater1&quot;) as Repeater;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int TagID = int.Parse(DataBinder.Eval(e.Item.DataItem, &quot;TagID&quot;).ToString());</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (TagID != null)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataTable t = getDataTableforRepeater2(TagID);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (t.Rows.Count &gt; 0)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Repeater1.DataSource = t;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Repeater1.DataBind();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
]]></content:encoded>
			<wfw:commentRss>http://yussi.nl/index.php/repeater-inside-repeater-asp-net.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>find value in repeater asp net</title>
		<link>http://yussi.nl/index.php/find-value-in-repeater-asp-net.html</link>
		<comments>http://yussi.nl/index.php/find-value-in-repeater-asp-net.html#comments</comments>
		<pubDate>Mon, 04 May 2009 17:18:00 +0000</pubDate>
		<dc:creator>yussi ariefiyono</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[repeater]]></category>

		<guid isPermaLink="false">/post/Find-value-in-repeater-asp-net.aspx</guid>
		<description><![CDATA[Problem: find value in repeater Solution: write this code in itemdatabound on your repeater: protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) &#160;&#160;&#160; { &#160;&#160;&#160;&#160;&#160;&#160;&#160; if (e.Item.ItemType == ListItemType.Item &#124;&#124; e.Item.ItemType == ListItemType.AlternatingItem) &#160;&#160;&#160;&#160;&#160;&#160;&#160; { &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Label title = e.Item.FindControl(&#34;Label1&#34;) as Label; // depend on what component you r searching for &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Response.Write(title.Text);&#160;&#160; // just check&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;]]></description>
			<content:encoded><![CDATA[<p>
<strong>Problem:</strong><br />
find value in repeater
</p>
<p>
<strong>Solution:</strong><br />
write this code in itemdatabound on your repeater:
</p>
<p>
<em>protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)<br />
&nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Label title = e.Item.FindControl(&quot;Label1&quot;) as Label; // depend on what component you r searching for<br />
</em>
</p>
<p>
<em><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.Write(title.Text);&nbsp;&nbsp; // just check&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; }<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://yussi.nl/index.php/find-value-in-repeater-asp-net.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

