Click here to Skip to main content
15,892,643 members
Articles / Programming Languages / C#

In celldouble click event "Input string was not in a correct format." error is generated..

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
11 Oct 2012CPOL 2.8K  
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace ass3cs{ public partial class show_database : Form ...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
11 Oct 2012fjdiewornncalwe
If you are going to use the Convert.ToInt32 method then you need to wrap that call in a try-catch so that you can capture and deal with that exception.The better and more preferred ways would be to use the Int32.Parse or TryParse methods as Wes has alluded to in his comment.The basic...
Please Sign up or sign in to vote.
11 Oct 2012ridoy
See these..you may find answer..http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/d0c45c47-7f17-4fb1-8228-ac2b6750db58[^]http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.celldoubleclick%28v=vs.85%29.aspx[^]
Please Sign up or sign in to vote.
13 Oct 2012NishTrivedi
private void GridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { UpdateDatabase ud = new UpdateDatabase(); ud.Controls["Fname_tbox"].Text = GridView.CurrentRow.Cells[0].Value.ToString(); ud.Show(); }

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Student
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions