Note that there are some explanatory texts on larger screens.

plurals
  1. PODefaultButton in Repeater with textbox and button?
    primarykey
    data
    text
    <p>I have a repeater, which represents a shoppingbasket. This shopping basket has an "Update quantity" and a "Delete item" button.</p> <p>When you edit the quantity and click enter, I will need it to use the Update quantity button (unlike now where it uses the delete item button).</p> <p>In the code I've tried fixing this by adding a "QuantityPanel" with a DefaultButton, but this doesn't solve my issue!</p> <p>Any ideas?</p> <p>My code:</p> <pre><code>&lt;asp:Repeater ID="ProductBasketRepeater" runat="server" onitemcommand="ProductBasketRepeater_ItemCommand" onitemdatabound="ProductBasketRepeater_ItemDataBound1"&gt; &lt;ItemTemplate&gt; &lt;tr class="BasketEntryItem"&gt; &lt;td class="ImageCol"&gt; &lt;asp:Image ID="ProductImageBox" runat="server" Width="50" /&gt; &lt;/td&gt; &lt;td class="NameCol"&gt; &lt;asp:HyperLink ID="ProductNameHyperlink" runat="server"&gt;&lt;/asp:HyperLink&gt; &lt;/td&gt; &lt;td class="PriceCol"&gt; &lt;asp:Label ID="PriceLabel" runat="server"&gt;&lt;/asp:Label&gt; &lt;/td&gt; &lt;td class="QuanCol"&gt; &lt;asp:Panel ID="QuantityPanel" runat="server" DefaultButton="UpdateQuantityBtn"&gt; &lt;asp:TextBox ID="QuantityBox" runat="server" Width="30px"&gt;&lt;/asp:TextBox&gt; &lt;asp:LinkButton ID="UpdateQuantityBtn" runat="server" Text="Opdater" CommandName="UpdateQuantity"&gt;&lt;/asp:LinkButton&gt; &lt;/asp:Panel&gt; &lt;/td&gt; &lt;td class="TotalCol"&gt; &lt;asp:Label ID="TotalPriceLabel" runat="server"&gt;&lt;/asp:Label&gt;&lt;br /&gt; &lt;asp:Button ID="DeleteProductBtn" runat="server" Text="Slet" CommandName="Delete" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/ItemTemplate&gt; &lt;SeparatorTemplate&gt; &lt;/SeparatorTemplate&gt; &lt;/asp:Repeater&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload