Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Datalist with a summarized field

Reply
Thread Tools

Datalist with a summarized field

 
 
Ed
Guest
Posts: n/a
 
      01-07-2004
Hi All,

I have a datalist control that shows a dataset content from a Sql Server
database.
IŽd like to show a summarized field (one of the dataset fields) after
the datalist is loaded.
How can I do this?, is there any way to do this using the footer
template ? or some other alternative ?

tks
Ed



 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      01-09-2004
Hi Ed,

The footer sounds like a good place for that. You can insert most any text
you want. Just drop a label control into the footer in design view and then
jam in the text value (from the database) on the ItemDataBound event as
shown below:

Private Sub DataList1_ItemDataBound _
(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.DataListItemEventArgs) _
Handles DataList1.ItemDataBound
Dim lblNew As Label
If e.Item.ItemType = ListItemType.Footer Then
lblNew = e.Item.FindControl("Label1")
lblNew.Text = "SQL data value here: " & Now.ToString
End If
End Sub

Ken

"Ed" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
>
> I have a datalist control that shows a dataset content from a Sql
> Server
> database.
> IŽd like to show a summarized field (one of the dataset fields) after
> the datalist is loaded.
> How can I do this?, is there any way to do this using the footer
> template ? or some other alternative ?
>
> tks
> Ed
>
>
>


 
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
Summarized EIGRP route selects best/worst metric of its component route ? pvarulkumar Cisco 0 10-14-2008 11:23 AM
De Lievie Lievie Iesselaam, een Kotschjdienschjt - Some of the disabilities of the dhimmis are summarized in the " Pact of Umar " reply@newsgroup.please Computer Support 1 01-07-2004 09:35 PM
Wireless Search with Summarized Results/Web Pages, powered by Google! Steve Chen C++ 0 12-08-2003 08:30 PM
web search with summarized result/web pages Steve Chen C Programming 1 11-26-2003 11:50 AM
web search with summarized results Steve Chen C++ 0 11-26-2003 07:12 AM



Advertisments