I am encountering a strange problem in the past 3 days, although that query return data the datagrid does not show either any data or any columns (I am fairly new to ASP but I dont think the code has any problem).
here is the code
protected void Page_Load(object sender, EventArgs e)
{
DataSet UserInfoFromDB = FillTableInfo();
GridViewData.DataSource = UserInfoFromDB.Tables[0];
GridViewData.AutoGenerateColumns = true;
}
the load calling this function to get all the data, I have already tested the output and its returning the data as it should be but the datagrid seems empty.
public DataSet FillTableInfo(){
var Query = "SELECT * FROM [dbo].[orders] ;";
SqlDataAdapter DataAdapter = new SqlDataAdapter(Query, CreateConnectionstring());
SqlCommandBuilder commandBuilder = new SqlCommandBuilder(DataAdapter);
DataSet DataSetVariable = new DataSet();
DataAdapter.Fill(DataSetVariable);
return DataSetVariable;
}
I have changed only the gridview id so far
Thank you in advance