claracruz
asked on
Datalist itemdatabound problem c#
Hello experts,
I have binding data to me datalist from codebehind.
I need to grab the contents of a label in the datalist, make some calculations and rebind the result to the label.
But my datalist count method returns 0 even if there there are records returned, so this does not work;-
for (int i = 0; i < DataList1.Items.Count; i++)
{
//calcualte stuff
}
and so my calcualtion are not taking place
Help!!!
I have binding data to me datalist from codebehind.
I need to grab the contents of a label in the datalist, make some calculations and rebind the result to the label.
But my datalist count method returns 0 even if there there are records returned, so this does not work;-
for (int i = 0; i < DataList1.Items.Count; i++)
{
//calcualte stuff
}
and so my calcualtion are not taking place
Help!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
private void dgHistory_ItemBound(object
{
for(int i=0;i<e.Item.Cells[i].Coun
{
//do stuff to each cell going across the line
//use the text property and System.Convert to do the math you need to do.
}
}