Re: Host Control in DataGridView

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks for your reply Nicholas.

I had a quick try to customize the example you provided and use it for
my own program, but stumbled on the fact that this custom cell uses a
method 'InitializeEditingControl'. In my case I need to show (without
editing) the LinkLabel. I have a feeling I need to overwrite other
methods in my case. I'll keep trying somewhat, but do not hesitate to
throw some more examples ;-)

Kind regards,
Frederik


On Jan 31, 2:52 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Frederik,

What you are doing should be possible with a custom control for a
DataGridView. Here is a link to a sample which hosts a MaskedTextBox:

http://msdn2.microsoft.com/en-us/library/ms180996.aspx

You should be able to adapt this to your needs.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"Frederik" <frederi...@xxxxxxxxx> wrote in message

news:949f9347-abc1-4ed8-bb0b-0375dde85603@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Hi all,

Can someone tell me how I can host a LinkLabel in a DataGridView (the
existing DataGridViewLinkColumn does not provide what I need). Do I
need to derive from DataGridViewTextBoxCell or from DataGridViewCell?

Many thanks for any feedback/examples.
Frederik
.



Relevant Pages

  • Re: Binging custom objects to the DataGridViewComboBoxColumn
    ... couldn't see how to bind a collection of custom objects to a combo on a grid ... I have bound a collection of type IBindingList to a DataGridView. ... private PropertyDescriptor displayProp; ... TypeConverter formattedValueTypeConverter, DataGridViewDataErrorContexts ...
    (microsoft.public.dotnet.framework.windowsforms)
  • DataGridView not "painting" all cells
    ... I've written a small program that uses a DataGridView to display some ... I've written a custom class that extends the DataGridViewTextBox ... The issue I've run into is that all the cells that have been "viewed" ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Equivalent of DataGridTableStyle for DataGridView?
    ... of custom columns in the DataGridView. ... would use the DataGrid's ability to switch between these sets of columns ... and DataGrid Controls" ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How to customise the DataGridViewColumn with a UserContro editingcontrol ?
    ... It illustrates a custom ... DataGridViewColumn control that uses a DateTimePicker: ... Show me your certification without works, ... DataGridView does not show the data content of the column. ...
    (microsoft.public.dotnet.languages.csharp)