I am not sure what is your overall requirement since it would be helpful to give you a better solution. However I will just give you what you asked.
Define a datatable.
DataTable dtable = new DataTable();
dtable.Clear();
dtable.Columns.Add("Name");
dtable.Columns.Add("Id");
Now, add rows to it in your button click function.
DataRow myRow= dtable.NewRow();
myRow["Name"] = "Bob";
myRow["Id"] = "231";
dtable.Rows.Add(myRow);
I hope it helps you achieve your goal. Please get back if you need any more help.