Tuesday, March 20, 2012

adding 2 columns in a dataset as a single column in datagrid

hi,

i am having 2 columns in a table in a dataset.

i want to add those two columns and bind the resultant total as a single column to the datagrid.

is it possible.

if yes, how o acheive this?

please help me.

thanks in advance.

muppidi.

A lot of ways. One is to use a computed column in the dataset, then just bind to that. Another way is to use something like this in your page:

<%= Eval("column1")+Eval("column2") %>

No comments:

Post a Comment