Home All Groups Group Topic Archive Search About

deactive datagridview cell select

Author
28 Jul 2006 3:37 PM
martin1
Hi, All,

The datagridview auto-select first column first row data and the slected
cell background color is blue, so how to turn off the select? or how to
change selected cell backcolor to white?

Thanks

Author
29 Jul 2006 11:26 AM
Ken Tucker [MVP]
Hi,

        Try this


        DataGridView1.DataSource = bsOrderDetails
        DataGridView1.Item(0, 0).Selected = False

Ken
-----------------------
Show quoteHide quote
"martin1" <mart***@discussions.microsoft.com> wrote in message
news:BA522FC9-3BBF-4225-96E7-B236C5D78645@microsoft.com...
> Hi, All,
>
> The datagridview auto-select first column first row data and the slected
> cell background color is blue, so how to turn off the select? or how to
> change selected cell backcolor to white?
>
> Thanks
>
>
Author
31 Jul 2006 1:22 PM
martin1
Thank you, Ken,

yes it is turn off first column first row selection, but when click it, it
is re-selected, so how to set up dataGridView selection false so that user
cannot select since the app start?

Show quoteHide quote
"Ken Tucker [MVP]" wrote:

> Hi,
>
>         Try this
>
>
>         DataGridView1.DataSource = bsOrderDetails
>         DataGridView1.Item(0, 0).Selected = False
>
> Ken
> -----------------------
> "martin1" <mart***@discussions.microsoft.com> wrote in message
> news:BA522FC9-3BBF-4225-96E7-B236C5D78645@microsoft.com...
> > Hi, All,
> >
> > The datagridview auto-select first column first row data and the slected
> > cell background color is blue, so how to turn off the select? or how to
> > change selected cell backcolor to white?
> >
> > Thanks
> >
> >
>
>
>