datagrid query

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
 
B

Bin Song

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top