B
Bruno Alexandre
Hi guys,
in this gridView code
<asp:GridView ... >
<asp:TemplateField ConvertEmptyStringToNull="False" HeaderText="Qty">
<ItemTemplate>
<asp:TextBox CssClass="cart-InputQty" MaxLength="2" Width="40px"
TextMode="SingleLine" ID="qty2" runat="server" Text="" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="qty" HeaderText="Qty" />
<asp:BoundField DataField="code" HeaderText="Code" ReadOnly="True" />
<asp:BoundField DataField="desc" HeaderText="Description" />
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DataObjectTypeName="Shopping.Cart"
TypeName="ShoppingCart"
SelectMethod=""
UpdateMethod="">
</asp:ObjectDataSource>
ShoppingCart is a Class and Cart is a DataTable inside ShoppingCart Class
How can I add to the TEXT property the Qty from the DataTable?
I tried:
<%# Bind("qty") %> but I get an error
I tried:
<%# Eval("qty") %> but I get an error
The BoundField works fine... but I want to convert it to a textbox so user's
can modify the quantity...
--
Thank you in Advance.
Bruno Alexandre
(a Portuguese in Denmark)
in this gridView code
<asp:GridView ... >
<asp:TemplateField ConvertEmptyStringToNull="False" HeaderText="Qty">
<ItemTemplate>
<asp:TextBox CssClass="cart-InputQty" MaxLength="2" Width="40px"
TextMode="SingleLine" ID="qty2" runat="server" Text="" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="qty" HeaderText="Qty" />
<asp:BoundField DataField="code" HeaderText="Code" ReadOnly="True" />
<asp:BoundField DataField="desc" HeaderText="Description" />
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DataObjectTypeName="Shopping.Cart"
TypeName="ShoppingCart"
SelectMethod=""
UpdateMethod="">
</asp:ObjectDataSource>
ShoppingCart is a Class and Cart is a DataTable inside ShoppingCart Class
How can I add to the TEXT property the Qty from the DataTable?
I tried:
<%# Bind("qty") %> but I get an error
I tried:
<%# Eval("qty") %> but I get an error
The BoundField works fine... but I want to convert it to a textbox so user's
can modify the quantity...
--
Thank you in Advance.
Bruno Alexandre
(a Portuguese in Denmark)