DataBindTable Incompatible with SqlDataReader does not implement IEnumerable

2
___ erkimt ___ DataBindTable Incompatible with SqlDataReader does not implement IEnumerable ______ qstntxt ___

I have a problem displaying the data in a column that is in the

asked by anonymous 12.04.2017 / 12:08

1 answer

1

This solution can help you:

var dt = new System.Data.DataTable();
dt.Load(rdr);

var enumerableTable = (dt as System.ComponentModel.IListSource).GetList();
Chart1.DataBindTable(enumerableTable, "Consumo_Medio_Real");
    
12.04.2017 / 14:08