datagrid binding problem

  • Thread starter Thread starter CreativeMind
  • Start date Start date
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 ?
 
 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
 
Back
Top