DataGridViewLinkCell: cannot set ReadOnly to false

M

Marshall

Hey all,

Working in C# with the Windows Forms 2.0 "DataGridView" control here, and a
column of cells of type DataGridViewLinkCell. The DGV is bound to a
datasource, and user is allowed to add rows.

The subject line is a bit of a misnomer in that I *can* set the ReadOnly
property to false - both at design time and at run-time - but am still
unable to directly edit the cell's contents (by clicking into the cell and
typing, for instance). Programmatically setting the cells' contents works
fine, but I can't for the life of me get the ReadOnly = false to take.

I've read up on the DGVLC and it's members, and although it speaks as if
this is absolutely doable, it's not doable for me. Most of its properties
are inherited from DataGridViewCell, which has this to say about the
ReadOnly property...

(taken from:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.datagridviewcell.readonly.aspx)

"The ReadOnly property indicates whether the data displayed by the cell can
be edited. You can set ReadOnly for individual cells, or you can make an
entire row or column of cells read-only by setting the
DataGridViewRow.ReadOnly or DataGridViewColumn.ReadOnly properties. By
default, if a cell's parent row or column is set to read-only, the child
cells will adopt the same value. You can override this default behavior by
setting ReadOnly for individual cells."

Just to note, I've got no trouble editing "normal" DGVCells. :)

Has anyone else seen this behavior, or have any clue as to what I'm missing?

Thanks in advance!

--Marshall
 
M

Marshall

<adding crosspost>

Hey again,

Still would love some input on this one, folks. Is no one else using the
DataGridViewLinkCell, maybe? Even if this is super easy and you're resisting
posting an "RTFM!" I'd still like to get that - at least I'd know to keep
digging. :)

Thanks!

--Marshll
 
M

Mark Carew

Hi Marshall,
Do you get an "exception" that you can examine in the debugger?
Regards
Mark
 
M

Marshall

Nope, no exception, and when I check the cell's ReadOnly property at runtime
it is indeed set to *false*, although the ability to edit the cell directly
is still not enabled.

Thanks for the response!

--Marshall
 

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

Top