I have a datatable with One ColumnName \"CustomerID\" with Integer DataType. Dynamically I want to add rows to the DataTable. For that, I had created one DataRow object like:
you could do it like that:
DR["CustomerID"] = string.IsNullOrEmpty(TextBox1.Text) ? null : Convert.ToInt32(TextBox1.Text);