Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Keeping track of controls in a DataGrid

Reply
Thread Tools

Keeping track of controls in a DataGrid

 
 
Manuel
Guest
Posts: n/a
 
      12-10-2004
I have the following DataGrid:

<asp:datagrid id="grdPackages" runat="server" AutoGenerateColumns="False"
AllowSorting="True">
<Columns>
<asp:BoundColumn DataField="ShipDate" SortExpression="ShipDate"
HeaderText="Ship Date"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="Confirm">
<ItemTemplate>
<asp:Button id="btnConfirm" runat="server" Text="Confirm"></asp:Button>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>


How do I add functionality to the btnConfirm? I want to calculate another
value based on the ShipDate [and store it in a database], how do I get the
date of the row?


 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      12-11-2004
"Manuel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have the following DataGrid:
>
> <asp:datagrid id="grdPackages" runat="server" AutoGenerateColumns="False"
> AllowSorting="True">
> <Columns>
> <asp:BoundColumn DataField="ShipDate" SortExpression="ShipDate"
> HeaderText="Ship Date"></asp:BoundColumn>
> <asp:TemplateColumn HeaderText="Confirm">
> <ItemTemplate>
> <asp:Button id="btnConfirm" runat="server"
> Text="Confirm"></asp:Button>
> </ItemTemplate>
> </asp:TemplateColumn>
> </Columns>
> </asp:datagrid>
>
>
> How do I add functionality to the btnConfirm? I want to calculate another
> value based on the ShipDate [and store it in a database], how do I get the
> date of the row?


Use the ItemDataBound event of the DataGrid.

John Saunders


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
keeping track of threads xzzy ASP .Net 2 10-06-2005 05:44 PM
What file does Thunderbird use for keeping track of articles? Larry Spitz Firefox 1 09-06-2005 10:21 PM
Need help keeping track of users "online" (i.e. viewing the web si =?Utf-8?B?dHBlcnJp?= ASP .Net 4 07-12-2005 08:40 AM
Opinions on keeping track of simple web stats with MS SQL Server/ASP.NET Utter Newbie ASP .Net 0 07-28-2003 09:01 PM
Keeping track of which user controls need to be loaded and which not John ASP .Net 0 07-08-2003 09:26 AM



Advertisments