In my program I have varying number of columns, so I've created universal input window for that which returns an array of strings

Now I want to add inputted data to DataGrid, but don't know how
Default DataGrid Add method supports only adding an object, so if I adding an array it just add spaces.

InputWindow iw = new InputWindow(inputs.ToArray());
if (iw.ShowDialog() == true)
{
try
{
var strings = iw.GetInputs();
ActiveDataGrid.Items.Add(strings);
}
catch (ArgumentException ex)
{
Debug.WriteLine($"{ex.Message} from InputWindow");
}
}
Strings from InputWindow returns correctly
How can I add these values corresponding to my varying number of columns?
You might consider creating a generic class that only contains string fields. Then feed your array to the class, and then feed the class object to the data grid.