Adnan
asked on
How to merge two dataset in a single DataGrid to show rows from bouth datasets.....
Hi
I want to merge two datasets into one single grid, and show rows from bouth datasets in the grid.....
now when run my app nothin will appear in the grid..i have done someting wrong here, can somone guide me here...?!
thanks...
I want to merge two datasets into one single grid, and show rows from bouth datasets in the grid.....
now when run my app nothin will appear in the grid..i have done someting wrong here, can somone guide me here...?!
thanks...
private void Reset()
{
gridImports.AutoGenerateColumns = false;
DataSet myDsFilesToUndo = AmEngine.Instance.GetUnreconciledImpFiles(myOperator);
DataSet importedReconsiledfiles = AmEngine.Instance.GetReconciledImpFiles(myOperator);
gridImports.DataSource = myDsFilesToUndo.Tables[0];
gridImports.DataSource = importedReconsiledfiles.Tables[0];
int test = myDsFilesToUndo.Tables[0].Rows.Count;
int test1 = importedReconsiledfiles.Tables[0].Rows.Count;
myDsFilesToUndo.Merge(importedReconsiledfiles);
//**********
//dataSet1.Merge(dataSet2, False, MissingSchemaAction.Add);
gridImports.DataSource = myDsFilesToUndo;
//***********
myDsFilesToUndo.Tables[0].Columns.Add(new DataColumn("ClientCount", typeof(int)));
myDsFilesToUndo.AcceptChanges();
if (myDsFilesToUndo.Tables[0].Rows.Count > 0)
{
btnUndoImport.Enabled = true;
foreach (DataRow idxRow in myDsFilesToUndo.Tables[0].Rows)
{
int fileId = (int)idxRow["ImpFile_ID"];
int clientCount = AmEngine.Instance.GetClientCountForImpfile(fileId.ToString());
idxRow["ClientCount"] = clientCount;
}
}
else
{
btnUndoImport.Enabled = false;
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER