Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

Repeater

  Asked By: Darla    Date: Nov 29    Category: Asp.net    Views: 1532
  

I am using a repeater to populate a table. Inside the table I have a row that contains a label, and two drop down boxes that i need to display. When I use the repeater and wrap the table with the header, item and footer templates and try to run my code it can not find the controls in that row. What do I need to do? Here is my code for the table that I am working on, the row that I am having problems with is outlined in red. Thanks for you help.



<asp:repeater ID=CollectionsTable runat="server">
<headertemplate>
<table width="100%" border="1" align="center">
<tr>
<td align="center" nowrap colspan="8"><font size="-1"> Billing Information </font></td>
<td align="center" nowrap colspan="7"><font size="-1"> Insurance Company Reimburstment Information </font></td>
</tr>
<tr>
<td align="center" nowrap colspan="3"><font size="-1"> As - Billed Information </font></td>
<td align="center" nowrap colspan="5"><font size="-1"> As - Billed Allowable Fee Estimation </font></td>
<td align="center" nowrap colspan="3"><font size="-1"> Insurance Company Payment </font></td>
<td align="center" nowrap colspan="4"><font size="-1"> Patient Payment Responsiblity </font></td>
</tr>
<tr>
<td align="center" nowrap><font size="-2"> CPT Code </font></td>
<td align="center" nowrap><font size="-2"> Description </font></td>
<td align="center" nowrap><font size="-2"> Standard Fee </font></td>
<td align="center" nowrap><font size="-2"> Total </font></td>
<td align="center" nowrap><font size="-2"> Ins Co Esti </font></td>
<td align="center" nowrap><font size="-2"> Patient Esti </font></td>
<td align="center" nowrap><font size="-2"> CoPayment </font></td>
<td align="center" nowrap><font size="-2"> Cont Write Off </font></td>
<td align="center" nowrap><font size="-2"> Estimated </font></td>
<td align="center" nowrap><font size="-2"> Actual Paid </font></td>
<td align="center" nowrap><font size="-2"> Variance </font></td>
<td align="center" nowrap><font size="-2"> Estimated </font></td>
<td align="center" nowrap><font size="-2"> Ins Actual </font></td>
<td align="center" nowrap><font size="-2"> PPTD </font></td>
<td align="center" nowrap><font size="-2"> Still Owed </font></td>
</tr>
</headertemplate>
<itemtemplate>
<tr>
<td align="center" nowrap><%# Conatiner.DataItem("CPTCode")%></td>
<td align="center" nowrap>  </td>
<td align="center" nowrap>   </td>
<td align="center" nowrap>  </td>
<td align="center" nowrap>   </td>
<td align="center" nowrap>   </td>
<td align="center" nowrap>  </td>
<td align="center" nowrap>   </td>
<td align="center" nowrap>  </td>
<td align="center" nowrap>   </td>
<td align="center" nowrap>  </td>
<td align="center" nowrap>   </td>
<td align="center" nowrap>   </td>
<td align="center" nowrap>  </td>
<td align="center" nowrap>   </td>
</tr>
</itemtemplate>
<footertemplate>
<tr>
<td colspan="8">Next Patient: <asp:label ID="Lbl_NextPatient" runat="server"/></td>
<td colspan="3" align="center" nowrap>
<asp:dropdownlist ID="DD_InsurPayAction" Font-Size="8" DataTextField="CollActionDescription" runat="server"/>
</td>
<td colspan="4" align="center" nowrap>
<asp:dropdownlist ID="DD_PatPayAction" Font-Size="8" DataTextField="CollActionDescription" runat="server"/>
</td>
</tr>


</table>
</footertemplate>
</asp:repeater>

Share: 

 

10 Answers Found

 
Answer #1    Answered By: Adalric Fischer     Answered On: Nov 29

ah the famous "I can't find  that control nested in a repeater  problem"....

In the DataList

<ASP:Repeater OnItemDataBound="evntItemDataBound1" runat="server" />


In the code:

Sub eventItemDataBound1(S As Object, e As dataListItemEventArgs)
Dim drop1 as doropdowlnist=e.Item.FindControl("NameOfDroDown")
... now grab data and bind to rb1 ...
end sub

The problem is the DropDown and controls  within don't exist at Pae_Load time. They will exist when the thing is bound later in the page rendering phase.

 
Answer #2    Answered By: Julia Flores     Answered On: Nov 29

However, the repeater  doesn't have an
onfilter attribute. Do you have any other tricks up your sleeve to get around
this problem.

 
Answer #3    Answered By: Jarvia Miller     Answered On: Nov 29

what does an Onfilter have to do with this. Your code  does not refer to
that nor does mine.... Am I missing something when reading the post.....

 
Answer #4    Answered By: Allan Bailey     Answered On: Nov 29

I have a class in another project called Order.ErrorDescription which
is an arraylist. eStr returns a set of errors i.e. if a user entered
the email address wrong then a message is displayed, if the telephone
number entered is in the wrong format then a different error message
appears. However, i would like to display  that information  in a neat
and presentable format on my webform and that is why i thought of
using a repeater. Can someone please help  me with the right format?
Currently it only returns the email error even if there are other
errors.


aspx.vb
Order.ValidateValues = False

Dim errStr As String


If Not Order.Validate() Then

For Each eStr As String In Order.ErrorDescription

errStr = (eStr & "<BR>")
Repeater1.DataSource = (errStr)

Repeater1.DataBind()
Next
End If


aspx:
<TR>
<TD><asp:repeater id="Repeater1" runat="server">
<ItemTemplate>
<%# Container.DataItem %>
</ItemTemplate>
</asp:repeater>
</TD>
</TR>

 
Answer #5    Answered By: Baylen Smith     Answered On: Nov 29

why is the loop, you can Just bind the repeater  with the arraylist and it
will display  the data

 
Answer #6    Answered By: Lughaidh Fischer     Answered On: Nov 29

Can someone elaborate more about repeaters? I read about them, but I am
still confused on what they are truly needed for and what purpose they
serve.

 
Answer #7    Answered By: Aalia Arain     Answered On: Nov 29

They are an efficient way to print out a list of items over and over
again.
For instance: you have a list of items in a dataset that will be
printed to the website in a report and the format will be identical. A
repeater is a great tool for this. You will go from top to bottom one
time in the list and the format doesn't change. Very efficient to use a
repeater for this.

 
Answer #8    Answered By: Terence Mitchell     Answered On: Nov 29

It at least shed more light than the Microsoft definition.

I hear folks on here wanting to include objects such as check boxes  to the
repeater. Why is this being done? Is it to check if certain records are to
be deleted?

 
Answer #9    Answered By: Adalwin Fischer     Answered On: Nov 29

You can include anything to a repeater  if you want. If you want to
simply create 100 checkboxes, a repeater would be ideal for this.



Basically a repeater is a great way to duplicate functionality for
multiple objects, whether it is simply looping through a list and
printing it, creating check boxes, or a combination if you want a list
with checkboxes so you have some functionality behind it. It doesn't
just have to be for static content, it just seems that it what the bulk
of people use it for, but it doesn't have to be, if that makes sense?

 
Answer #10    Answered By: Skye Hughes     Answered On: Nov 29

Not to belabor the point, but it should be noted that the Repeater has no
native markup or format of its own. Everything that it displays is
something that you have told it to display; they're awfully handy.

 
Didn't find what you were looking for? Find more on Repeater Or get search suggestion and latest updates.




Tagged: