datagrid binding problem

C

CreativeMind

i have a datagrid having a templatecolumn with
headertext="CompletionDate".I want to bind it with either column
'CompletionDate'(datetime) or 'IsReady'(bit). If 'Isready' value is
false, then Row of datagrid show CompletionDate otherwise show string
'Ready' if 'IsReady' is true. e.g, if there are 100 rows in grid, then
completiondate column may consist of some values as dates and some
values as 'Ready' and some may be null. how can i ?
 
M

Munna

 i have a datagrid having a templatecolumn with
headertext="CompletionDate".I want to bind it with either column
'CompletionDate'(datetime) or 'IsReady'(bit). If 'Isready' value is
false, then Row of datagrid show CompletionDate otherwise show string
'Ready' if 'IsReady' is true. e.g, if there are 100 rows in grid, then
completiondate column may consist of some values as dates and some
values as 'Ready' and some may be null. how can i ?

Hi,

Do it in itemdatabound of the grid...
DataGrid.ItemDataBound Event 's one of the major purpose is to support
conditional formating

http://www.codeproject.com/KB/webforms/gridcolumnformatting.aspx

Best of luck

Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com
 

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

Top