| Did | Dname |
Now i have a data Adapter with the select query as follows "select * from OracleTable order by did";
when i was binding it to a datagridview using dataset i will get two coloumns as above
the Question is i need to hide the details of Did or completely the Did column
the another factor is that i am using the same query for another operation so the query need not to be changed but column have to appear hidden

Satyapriya NayakRank #47 · 31.5K reputationPosted Mar 6, 2013, 2:07 AM EST
{
OleDbConnection con = new OleDbConnection(ConnectionString);
con.Open();
str = "select * from test ";
com = new OleDbCommand(str, con);
oledbda = new OleDbDataAdapter(com);
DataSet ds = new DataSet();
oledbda.Fill(ds, "test");
dataGridView1.DataMember = "test";
dataGridView1.DataSource = ds;
//dataGridView1.Columns[0].Visible = false;
dataGridView1.Columns["Did"].Visible = false;
}
Srikanth Suryadevara37 reputationPosted Mar 6, 2013, 2:15 AM EST
dataGridView1.Columns["Did"].Visible = false;
it is showing a error
and i have wrote the dataadapter in another class and that class method returns data set
this dataset will be used in my applctn
TulasiRank #2,544 · 549 reputationPosted Mar 18, 2013, 3:24 AM EDT