select field1=case field1 when 1 then N'系统' when 2 then N'新闻' end from table

解决方案 »

  1.   

    那怎么标识这个column呢?
    它的DataField是"op"字段,而库中op存放的是数字,我的意思是当op为1时,如果在datagrid中对应的column显示"系统"字符串,而当为2时,显示"新闻".
      

  2.   

    方法一:绑定模板 <ItemTemplate>
        <asp:Label runat="server" Text='<%# Operation(DataBinder.Eval(Container.DataItem, "jsz")) %>' ID="Label4" />
    </ItemTemplate>
            codebehind:
             public string Operation(int num)
              {
                string strOp;
                strOp = (num==1?"系统":"新闻");
                return strOp;
              }
    方法二: 如果你用dataset做数据源,你可先对dataset中的datatable的相应列进行修改,然后再帮定。     
      

  3.   

    在datagrid的itembound事件裡面,
    if e.Item.Cells(2).text=1 then e.Item.Cells(2).text='系統'
    else e.Item.Cells(2).text='新闻'