Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Remove the datagridview border

$
0
0
I have a datagrid view in my WPF window (VS2008).
I need to remove the first colonne or border shown in the picture 
the xaml code is:
.
.
xmlns:WinForms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
.
.
.
.
.<WindowsFormsHost Grid.Row="0" Grid.Column="0"><WinForms:DataGridView x:Name="dataGridView1"></WinForms:DataGridView></WindowsFormsHost>

and the c# code is:
string cnx_string = ConfigurationManager.ConnectionStrings[1].ConnectionString;
            try
            {
                con = new OracleConnection(conStr);
                con.Open();
                query = "select * from STRUCTURE";
                da = new OracleDataAdapter();
                da.SelectCommand = new OracleCommand(query, con);
                dt = new DataTable();
                da.Fill(dt);
                dataGridView1.DataSource = dt;
                con.Close();
            }
            catch (OracleException ex)
            {
              System.Windows.MessageBox.Show(ex.Message);
            }

thanks    

Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>