how do i display the sql query result in a grid ,so as to the other columns should be hidden .for example if i select name,,then only name entries shoould be der, tthere should be only one column.similarly for name ,rollno -2 columns and so on ..
databinding in xaml cant be applied obviously ...as colums are to be generated dynamically .
please help ..
Loading

Suthish NairRank #92 · 22.8K reputationPosted Apr 8, 2011, 8:15 AM EDT
Is this a WPF thread?
Refer article by Mahesh Chand: Link
CrishRank #1,487 · 1.1K reputationPosted Apr 9, 2011, 1:35 AM EDT
shriram iyer9 reputationPosted Apr 9, 2011, 9:38 PM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Apr 10, 2011, 10:57 AM EDT
shriram iyer9 reputationPosted Apr 11, 2011, 1:56 AM EDT
result:
Student_name
Sam
Bam
tam
if query is select student_name,roll_no from student_table
result:
Student_name roll_no
Sam 1
Bam 2
tam 3
if query is select roll_no from student_table
result: roll_no
1
2
3
i.e:the other columns should not be displayed only the queried column entries sholud be displayed