View Single Post
  #4 (permalink)  
Old June 14th, 2009, 02:35 PM
westannex westannex is offline
Authorized User
 
Join Date: Mar 2009
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks for that. It seems that I overestimated my own abilities to continue from there!

What I want to do is change the value in one column depending on the value in another, as the row is being built.

I thought I could use:
string prodtype = (string) DataBinder.Eval(dataItem.DataItem, "ProductType");
if (prodtype == "Sample")
{
(string) DataBinder.Eval(dataItem.DataItem, "ProductText") = "Sample product";
}

where ProductType and ProductText are the 2 columns.

But the page wont run with this code.