• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

DataGrid Question

H

Hotwheels

#1
I have a data grid that is only being used for presenting data no editing.
I cannot get the blue cell highlight to disappear from the upper left corner
cell.

Can I do it?

I het set these properties in C# VS 2005 2.0 .net.

dataGridView1.ColumnCount = 2;
dataGridView1.ColumnHeadersVisible = false;
dataGridView1.AutoSizeColumnsMode =
DataGridViewAutoSizeColumnsMode.AllCells;
dataGridView1.AutoResizeColumn(1);
dataGridView1.RowHeadersVisible = false;
dataGridView1.AllowUserToAddRows = false;

Mike
 
S

Sreenivas

#2
On Sep 23, 9:13 pm, Hotwheels <Hotwhe...@newsgroup>
wrote:

> I have a data grid that is only being used for presenting data no editing..
I hope you are using Gridview control though you said DataGrid .Yeah ,
it's obesolate.
Why are you using Gridview ? go for light weight controls like
Repeater or Datalist since your purpose is to
just displaying data .

> I cannot get the blue cell highlight to disappear from the upper left corner
> cell.
>
> Can I do it?
>
> I het set these properties in C# VS 2005 2.0 .net.
>
>             dataGridView1.ColumnCount = 2;
>             dataGridView1.ColumnHeadersVisible = false;
>             dataGridView1.AutoSizeColumnsMode =
> DataGridViewAutoSizeColumnsMode.AllCells;
>             dataGridView1.AutoResizeColumn(1);
>             dataGridView1.RowHeadersVisible = false;
>             dataGridView1.AllowUserToAddRows = false;
>
> Mike.