-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Swami
Message 1 in Discussion

    Hi all, I'm not able to access the values of datagrid cells in ItemDataBound 
event.   My function is  
Private Sub dgdDetails_ItemDataBound(ByVal sender As Object, ByVal e As 
System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgdDetails.ItemDataBound 
 
Select Case e.Item.ItemType 
Case ListItemType.AlternatingItem, ListItemType.Item, ListItemType.SelectedItem 
'Calculate total for the field of each row and alternating row. 
intTotalValue = 0 
dblCost = 0 
If e.Item.Cells(5).Text <> "" Then 
intTotalValue += CDbl(e.Item.Cells(5).Text) 
End If    
End Select 
End Sub 
e.Item.Cells(5).Text is always returning as "". So not able to calculate total. 
Can some one help me  
Again 
dgdDetails.Columns(5).HeaderText = "Text" 
Dim dt As DataTable = New DataTable("Details") 
dsTable = New DataSet() 
'Code to fill datatable in normal way 
'Add to the DataSet 
dsTable.Tables.Add(dt) 
dgdDetails.DataSource = dsTable.Tables("Details") 
dgdDetails.DataBind() 
In ItemDataBound I'm able to access HeaderText but not the values of ITEM and 
ALTERNATE ITEM . 
Pls help me. 
Thanks in advance 
Swami 
 

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to