0
votes

i'm using grid control in DevExpress reports when i set data source dynamically to my grid control its not showing a output, anyone please help me to get.

this is my code

        DataTable dtJobOrder = new DataTable();
        string DTQuery = @"Select Product from JobOrder";

        dtJobOrder = Generic.GetDataTable(DTQuery);
        grdspare.DataSource = dtJobOrder;
2
Are you sure your dtJobOrder contains rows ? - SidAhmed
you can check dtJobOrder.Rows.Count - Milen

2 Answers

0
votes

Probably you already found a way. You can achieve this by calling PopulateColumns method on grid view.

0
votes

When you are dynamically set the data source to gridview then you have to set AutoGeneratedColumns to true.

AutoGeneratedColumns = true