Any way to disable a column in a DataGrid?

R

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!
 
G

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.
 
C

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...
 
R

Rico

Oops! Sorry, my apologies. I think that's the second time I've done that.
I was bouncing back and forth between ASP.net and WinForms and have been
reference both quite a bit.

I'll be more careful next time.

Rick
 
R

Rico

Ah, I see what happened! I notice that ADO.net isn't in the newsgroup list,
which is what I had intended. Again, my apologies.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top