How can I do it without FindControl? The place I would be using FindControl
are above this control, the index would change. Were you talking about a
different technique? If so, could you give me an example? Thanks.
"Alvin Bruney [MVP]" <some guy without an email address> wrote in message
news:ez7QMj44HHA.5724@TK2MSFTNGP05.phx.gbl...
> Why post this to so many groups, it's not necessary at all. In any case,
> you will need CType, you won't necessarily need FindControl. If you know
> the column, you can use the appropriate index to the cell.
>
> --
> Regards,
> Alvin Bruney
> ------------------------------------------------------
> Shameless author plug
> Excel Services for .NET - MS Press
> Professional VSTO 2005 - Wrox/Wiley
> OWC Black Book
www.lulu.com/owc >
> "Nathan Sokalski" <njsokalski@hotmail.com> wrote in message
> news:uNdcti34HHA.5852@TK2MSFTNGP02.phx.gbl...
>>I have two fields in the Datatable that I am using as my DataSource that I
>>need to multiply together before displaying them. Here is the databinding
>>expressions from my ASPX file to display the fields separately:
>>
>> '<%# Databinder.Eval(Container.DataItem,"price","{0:C}") %>'
>> '<%# Databinder.Eval(Container.DataItem,"quantity","{0:D}") %>'
>>
>> These are obviously both numeric values, but because my DataTable is not
>> created from a database, I cannot add an extra field by modifying my SQL
>> statement. Is there a way to somehow include an expression in the
>> databinding expression that multiplies the two values together? The only
>> alternative that I can think of is to use the ItemDataBound event and
>> manually assign the product of the two values to the desired control, but
>> because this requires using CType and FindControl, it is rather
>> inefficient. Any other ideas? Thanks.
>> --
>> Nathan Sokalski
>> njsokalski@hotmail.com
>>
http://www.nathansokalski.com/ >>
>
>