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
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