How to insert numeric up down control within Datagridview?

Posted by Suriyag under C# on 12/17/2012 | Points: 10 | Views : 12561 | Status : [Member] | Replies : 1
How to insert numeric up down control within Datagridview?


I have tried using below codings...


foreach (DataGridViewRow DR in this.General_dgv.Rows)
{
if (DR.Index < this.General_dgv.Rows.Count - 1)
{
NumericUpDown g_bill_no_nud = new NumericUpDown();
g_bill_no_nud.Increment = 0;
g_bill_no_nud.HideButtons = true;
g_bill_no_nud.Maximum = Decimal.MaxValue;
g_bill_no_nud.DecimalPlaces = 0;
g_bill_no_nud.TabStop = true;
g_bill_no_nud.Dock = DockStyle.Fill;
General_dgv.Rows[DR.Index].Cells[1].Panel.Controls.Add(g_bill_no_nud);
General_dgv.Rows[DR.Index].Cells[1].Panel.Colspan = 1;
General_dgv.Rows[DR.Index].Cells[1].Panel.Rowspan = 1;
g_bill_no_nud.KeyPress += this.numericupdown_keyup;

}}

But i cant get this value to store..


Is there any possibility ???


Regards
Suriya

SuriyaPrakash


Responses

Posted by: Kundnani.Rt on: 1/19/2013 [Member] Starter | Points: 25

Up
0
Down
Read the following article:

http://msdn.microsoft.com/en-us/library/aa730881(v=vs.80).aspx

Suriyag, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response