locked
Remove Zero From Repater RRS feed

Answers

  • User-893317190 posted

    Hi Gopi.MCA ,

    You could use a ternary expression in the "<%# %> ".

    Below is my code. 

    <ItemTemplate>
        
                <tr>
                    <td class="text-center">
                             <%# Eval("BatchNo") %>
             </td>
              
    
                        <td class="text-center">  <%# Convert.ToDouble( Eval("Total_Qty")) ==0?"":Eval("Total_Qty") %> </td>
                      <td class="text-center">   <%# Convert.ToDouble( Eval("Dep1Qty")) ==0?"":Eval("Dep1Qty") %>  </td>
                     <td class="text-center">   <%# Convert.ToDouble( Eval("Dep1Value")) ==0?"":Eval("Dep1Value") %></td>
                      <td class="text-center">  <%#   Convert.ToDouble( Eval("Dep2Qty")) ==0?"":Eval("Dep2Qty") %>  </td>
                     <td class="text-center">     <%#  Convert.ToDouble( Eval("Dep2Value")) ==0?"":Eval("Dep2Value")  %></td>
                      <td class="text-center">    <%# Convert.ToDouble( Eval("TotalQty")) ==0?"":Eval("TotalQty") %></td>
                     <td class="text-center">   <%#  Convert.ToDouble( Eval("TotalValue")) ==0?"":Eval("TotalValue") %></td>
                </tr>
           </ItemTemplate>
                  

    Just change the itemTemplate.

    Best regards,

    Ackerly Xu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 31, 2018 2:03 AM