csharp_learner
asked on
Get INT from DataTable C#
Hi I have a DataTable if INT and strings.
When i retrive the string from the DataTable "TextBox1.Text = datatable.Rows[0][2].ToStr ing();"
I have no problem, but when i want to retrive a INT from the datatable in the same way to a numberupdownBox "numericUpDown1.Value = ordt.Rows[0][7];" the error "Cannot implicitly convert type object to decimal kept blocking.
How can I solve this?
When i retrive the string from the DataTable "TextBox1.Text = datatable.Rows[0][2].ToStr
I have no problem, but when i want to retrive a INT from the datatable in the same way to a numberupdownBox "numericUpDown1.Value = ordt.Rows[0][7];" the error "Cannot implicitly convert type object to decimal kept blocking.
How can I solve this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Actually you will also need .ToString() after the [7] if it is going to be initially an object.