select cast(id as varchar)+','+cast(Folderid as varchar) as ID,name from youtable

解决方案 »

  1.   

    From  saucer(思归) >>DataGrid如何添加两个主键if your datatable has two primary keys, create a new column:DataTable1.Columns.Add("newKey", typeof(string), "PKCol1 + '#' + PKCol2");then do
    DataGrid1.DataKeyField = "newKey";when you get
    string s = DataGrid1.DataKeys[n];
    string[] skeys = s.Split('#');http://expert.csdn.net/Expert/topic/2249/2249561.xml?temp=3.084964E-02
      

  2.   

    Select ID1+"-"+ID2 from tablename