| 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
TulasiPosted Mar 18, 2013, 7:24 AM
Srikanth SuryadevaraPosted Mar 6, 2013, 7:15 AM
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
Satyapriya NayakPosted Mar 6, 2013, 7:07 AM
{
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;
}