How to add controls in a datagrid control?

B

barbara_dave

Hi All,

I'd like to add numericUpDown controls in every cell of a column of a
datagrid. Is there some sample code I can get for reference?

Thanks In Advance!
 
S

Simon Tamman

Here's a doc for creating a calendar column in a datagridview.

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

Just replicate the code and use a numeric up down control instead of the
calandar control and it should (kinda) work.
There are issues with this code with IndexOutOfRangeExceptions when on a row
that isn't the first row, email me if you run into those problems on
(e-mail address removed) as I also have the
solution for those woes.

HTH

Simon
 

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