Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Jan 27, 2009 12:41 PM|LINK
Hi to all,
I want to read some records from xml file using LINQ and bind to datagridview control
dttemp = query1.CopyToDataTable();
dataGridView1.DataSource = dttemp;
but in my situation i dont know how many columns will coming(because based on application situation it'll create different number of column name so that i cant specify column names) if i execute the the same query then it will not bind anything instead of
bind the records i write one for loop
now the control comes inside of for loop so it can retrieve data but while binding to gridview this will not bind properly.
Experts please tell me without specifying select clause how to bind the columns to dgv.