Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Computed value in a Gridview

0 views
Skip to first unread message

Arne Garvander

unread,
Jun 14, 2006, 4:22:02 PM6/14/06
to
One the columns in my gridview needs to be computed.
I am not able to get my computed value to stick.
DataTable orders;
getSqlData(orders);
for (i = 0; i < orders.Rows.Count; i++)
{
orders.Rows[i][8] = i * 8;
}
GridView1.DataSource = orders;
GridView1.DataBind();
How can I get a gridview control to display my computation?
I am already using an ItemTemplate for some of my columns but an
ItemTemplate will not work at this time

--
Arne Garvander
(I program VB.Net for fun and C# to get paid.)

Cor Ligthert [MVP]

unread,
Jun 15, 2006, 2:30:15 AM6/15/06
to
Arne,

Are you sure that this code is reached and that there is not thrown an
uncatched error before that which results in ending the program but posting
back to your client.

Although I never used a gridview yet, as it acts the same as a datagrid form
version 2002/2003. Can you place a raw gridview on your page without any
further editing and use that to show. Than this column should be in my idea
the *9th* column going down as 8, 16, 24 etc.

Cor

"Arne Garvander" <ArneGa...@discussions.microsoft.com> schreef in
bericht news:0C9FCA85-A7D0-47AE...@microsoft.com...

Cor Ligthert [MVP]

unread,
Jun 15, 2006, 2:36:23 AM6/15/06
to
Arne,

Can you try not to reformulate your messages.

Now I have answered a message new while it was already answered.

Just go on in the same thread. You see that you get than responses as well.

Thanks in advance

Cor

"Arne Garvander" <ArneGa...@discussions.microsoft.com> schreef in
bericht news:0C9FCA85-A7D0-47AE...@microsoft.com...

0 new messages