Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: PLEASE HELP !!


Message #1 by "dwarakanath hanumappanahalli" <madivi2002@y...> on Tue, 16 Apr 2002 18:40:33
Try this

Code segment within the .CS file

TextBox tblProductNum =3D
(TextBox)e.Item.Cells[2].FindControl("tbProductNum");
TextBox tblLotNum =3D (TextBox)e.Item.Cells[3].FindControl("tbLotNum");

Code segment within the datagrid

<asp:templatecolumn HeaderText=3D"Item Description">
   <itemtemplate>
      <asp:Label runat=3D"server" Text=3D'<%# DataBinder.Eval(Container,
"DataItem.ProductNum") %>' Width=3D"250px"></asp:label>
   </itemtemplate>
   <edititemtemplate>
      <asp:TextBox ID=3D"tbProductNum" runat=3D"server" Text=3D'<%#
DataBinder.Eval(Container, "DataItem.ProductNum") %>'
Width=3D"250px"></asp:textbox>
   </edititemtemplate>
</asp:templatecolumn>
<asp:templatecolumn HeaderText=3D"Lot Number">
   <itemtemplate>
   <asp:Label runat=3D"server" Text=3D'<%# DataBinder.Eval(Container,
"DataItem.LotNum") %>' Width=3D"100px"></asp:label>
   </itemtemplate>
   <edititemtemplate>
     <asp:TextBox ID=3D"tbLotNum" runat=3D"server" Text=3D'<%#
DataBinder.Eval(Container, "DataItem.LotNum") %>'
Width=3D"100px"></asp:textbox>
   </edititemtemplate>
</asp:templatecolumn>
<asp:templatecolumn HeaderText=3D"Quantity">
   <itemtemplate>
      <asp:Label runat=3D"server" Text=3D'<%# DataBinder.Eval(Container,
"DataItem.Qty") %>' Width=3D"75px"></asp:label>
   </itemtemplate>
   <edititemtemplate>
      <asp:TextBox ID=3D"tbQty" runat=3D"server" Text=3D'<%#
DataBinder.Eval(Container, "DataItem.Qty") %>'
Width=3D"75px"></asp:textbox>
      </edititemtemplate>
</asp:templatecolumn>
<asp:templatecolumn HeaderText=3D"Unit Price">
   <itemtemplate>
      <asp:label runat=3D"server" Text=3D'<%# DataBinder.Eval(Container,
"DataItem.UnitPrice") %>' Width=3D"75px" ID=3D"Label1"></asp:label>
   </itemtemplate>
   <edititemtemplate>
      <asp:textbox ID=3D"tbUnitPrice" runat=3D"server" Text=3D'<%#
DataBinder.Eval(Container, "DataItem.UnitPrice") %>'
Width=3D"75px"></asp:textbox>
   </edititemtemplate>
</asp:templatecolumn>

-Tri

-----Original Message-----
From: dwarakanath hanumappanahalli [mailto:madivi2002@y...]
Sent: Tuesday, April 16, 2002 1:41 PM
To: ASPX_Professional
Subject: [aspx_professional] PLEASE HELP !!


I'm trying to get the values of the selected row in a grid onclicking a
button in the grid. Strangely I'm able to get the first value in the
column but not the others. Can you please help me !!

Dwarka

  Return to Index