I'm using an Item template to display my grid. I've used the Cardview example as my starting point and went from there. I've got everything working well except for two issues. I need to be able to set a label for each row.
First, I need to set the value of a lablel. The label would actually be the same value for every row but it's not held within the database. It's calculated in the code behind. I'm assuming I'd use the itemcreated event to set the value but I'm not sure how to access it. Can some one help me out with that or point me to a clear example?
The second, I have an anchor tag that would allow the user to open up a new window to view Details of the selected row. I need to be able to set paramaters in the link that I'll be retrieving from the database to pass to the new page to be picked up by th querystring. I
tried <a href="UrlBlockedError.aspx?syscode=" + <%# Eval("Syscode") %> target="_blank">Details</a> but it didn't get picked up and it messed up the display. How can I set the parms for the URL?
Here's my template:
You'll notice next to lblDateRange1 a hard coded date range. That's what I need to set the label to.
First, I need to set the value of a lablel. The label would actually be the same value for every row but it's not held within the database. It's calculated in the code behind. I'm assuming I'd use the itemcreated event to set the value but I'm not sure how to access it. Can some one help me out with that or point me to a clear example?
The second, I have an anchor tag that would allow the user to open up a new window to view Details of the selected row. I need to be able to set paramaters in the link that I'll be retrieving from the database to pass to the new page to be picked up by th querystring. I
tried <a href="UrlBlockedError.aspx?syscode=" + <%# Eval("Syscode") %> target="_blank">Details</a> but it didn't get picked up and it messed up the display. How can I set the parms for the URL?
Here's my template:
You'll notice next to lblDateRange1 a hard coded date range. That's what I need to set the label to.
<ItemTemplate> |
<div style="width:900px"> |
<div style="float:left"><asp:Label ID="lblDateRange1" runat="server" Text="Label"></asp:Label>5/15/2010-5/20/2010 to 5/21/2010-5/26/2010 </div> |
<div style="float:right"><a href="UrlBlockedError.aspx" target="_blank">Details</a> |
</div> |
<div style="float:left; clear:both; width:10%"><%# "System: " +Eval("Syscode") %></div> |
<div style="float:left; width:30%"><%# "Line of Business: " + Eval("LineofBusiness")%></div> |
<div style="float:left; width:20%"><%# Eval("CodeType") + ": " %> <%# Eval("Code")%> </div> |
<div style="float:left; width:20%"><%# "AA Rate Drop: " + Eval("System_Adj_Rate_Drop")%></div> |
<div style="float:left; width:20%"><%# "ADJ Claims Chang: " + Eval("Claims_Manually_Adj_Drop") %></div> |
<div class="tablediv"> |
<div class="rowdiv"> |
<div class="celldiv"> </div> |
<div class="celldiv">Received Claims</div> |
<div class="celldiv">Completed Claims</div> |
<div class="celldiv">Auto Adjucicated Claims</div> |
<div class="celldiv">AARate</div> |
</div> |
<div class="rowdiv"> |
<div class="celldiv">Previous:</div> |
<div class="celldiv"><%# Eval("Prev_Claims_Received")%></div> |
<div class="celldiv"><%# Eval("Prev_Claims_Completed") %></div> |
<div class="celldiv"><%# Eval("Prev_Total_Auto_Adj_Claims")%></div> |
<div class="celldiv"><%# Eval("Previous_Auto_Adj_Rate") %></div> |
</div> |
<div class="rowdiv"> |
<div class="celldiv">Current:</div> |
<div class="celldiv"><%# Eval("Claims_Received") %></div> |
<div class="celldiv"><%# Eval("Claims_Completed") %></div> |
<div class="celldiv"><%# Eval("Total_Auto_Adj_Claims") %></div> |
<div class="celldiv"><%# Eval("Current_Auto_Adj_Rate") %></div> |
</div> |
</div> |
</div> |
</ItemTemplate> |