If you have the grid bound to a data source and then you assign another data source containing some of the columns that exists in the first one (with the same name), those columns are not shown:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
DataTable table = new DataTable();
table.Columns.Add("col1");
table.Columns.Add("col2");
for (int i = 0; i < 10; i++)
{
table.Rows.Add("A " + i, "B " + i);
}
radGridView1.DataSource = table;
}
private void radButton1_Click(object sender, EventArgs e)
{
DataTable table = new DataTable();
table.Columns.Add("col1");
table.Columns.Add("col2");
table.Columns.Add("col3");
table.Columns.Add("col4");
for (int i = 0; i < 10; i++)
{
table.Rows.Add("Z " + i, "X " + i, "C " + i, "V " + i);
}
//work around
//radGridView1.MasterTemplate.Reset();
radGridView1.DataSource = table;
}
}