datagrid query

  • Thread starter Thread starter reiks
  • Start date Start date
R

reiks

My select query is a s follows
select qty from sales;

My datagrid as two template columns with textboxex in Item
template.I want to use second template column as a
compute column in my datagrid which
depends on column 'qty' values of my select statement

compute column's value should be as follows
if( qty > 10) qty+10 else
qty-10

How can give my 'DataBinder.eval(containder.dataitem))'
expression to my textbox in html?

How can I acheive this?

How complex evaluation expressions can be given for
datagrid columns either at design time or programatically?

plzzz help me out

thanks in advance,
vijaya
 
Then just create a computed column in your SQL statement:
SELECT qty,
Computed_qty = Case When ( qty > 10) THEN (qty+10) else
(qty-10) End
FROM sales

Bin Song
MCP
 
Back
Top