Home All Groups Group Topic Archive Search About

Any way to disable a column in a DataGrid?

Author
17 Mar 2006 8:35 PM
Rico
Hello,

I have a Datagrid with two rows, "Product Description" and "Serial Number".
I want the user to be able to add / edit the serial number, but not the
Product Description.  In fact, I don't even want the description to be able
to get the focus (i.e. disabling the column).  Is there anyway to do this?

Thanks!

Author
17 Mar 2006 9:20 PM
GregG
"Rico" <r c o l l e n s @ h e m m i n g w a y . c o mREMOVE THIS PART
IN CAPS> said:

>Hello,
>
>I have a Datagrid with two rows, "Product Description" and "Serial Number".
>I want the user to be able to add / edit the serial number, but not the
>Product Description.  In fact, I don't even want the description to be able
>to get the focus (i.e. disabling the column).  Is there anyway to do this?

Look into using templates for the control rather than the default.

FWIW,

Greg G.
Author
18 Mar 2006 7:36 AM
Cor Ligthert [MVP]
Rico,

Will you be so kind that when you post to the newsgroup languages.vb and
dotnet.general and are writing about a Datagrid to tell that it is about
ASPNET.

In those two newsgroup WinForms is the default.

Because that you also have posted to ASPNET, I could see that you mean an
ASPNET form.

Thanks in advance.

Cor

"Rico" <r c o l l e n s @ h e m m i n g w a y . c o mREMOVE THIS PART IN
CAPS> schreef in bericht news:m4FSf.155026$B94.113974@pd7tw3no...
Show quoteHide quote
> Hello,
>
> I have a Datagrid with two rows, "Product Description" and "Serial
> Number". I want the user to be able to add / edit the serial number, but
> not the Product Description.  In fact, I don't even want the description
> to be able to get the focus (i.e. disabling the column).  Is there anyway
> to do this?
>
> Thanks!
>
Author
18 Mar 2006 8:16 AM
Cor Ligthert [MVP]
Rico,

In the newsgroup General where you disconnected the other links I saw that
you have posted it wrong to ASPNET. Therefore again a question. Please as
you crosspost keep the newsgroups complete.

Here is the most simple answer on our website. If you want it more advance
than you can use the styles (as well a lot of samples on our website).

http://www.vb-tips.com/default.aspx?ID=76a81eb8-ea2d-48f4-99c3-a3539697edbd

I hope this helps,

Cor


Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schreef in bericht
news:uhzN%235lSGHA.736@TK2MSFTNGP12.phx.gbl...
> Rico,
>
> Will you be so kind that when you post to the newsgroup languages.vb and
> dotnet.general and are writing about a Datagrid to tell that it is about
> ASPNET.
>
> In those two newsgroup WinForms is the default.
>
> Because that you also have posted to ASPNET, I could see that you mean an
> ASPNET form.
>
> Thanks in advance.
>
> Cor
>
> "Rico" <r c o l l e n s @ h e m m i n g w a y . c o mREMOVE THIS PART IN
> CAPS> schreef in bericht news:m4FSf.155026$B94.113974@pd7tw3no...
>> Hello,
>>
>> I have a Datagrid with two rows, "Product Description" and "Serial
>> Number". I want the user to be able to add / edit the serial number, but
>> not the Product Description.  In fact, I don't even want the description
>> to be able to get the focus (i.e. disabling the column).  Is there anyway
>> to do this?
>>
>> Thanks!
>>
>
>