how to get the data of cell after databinding in windows datagrid
how to get the data of cell after databinding in windows datagrid
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
kiran kumarPosted Feb 26, 2010, 6:08 AM
just make a statement like this
yourarrayname[i]= dataGridView1.Rows[i].Cells[3].Value;
mark the answer if it helps you
radhika gantaPosted Feb 27, 2010, 5:59 AM
kiran kumarPosted Feb 27, 2010, 5:41 AM
kiran kumarPosted Feb 27, 2010, 5:35 AM
radhika gantaPosted Feb 27, 2010, 5:29 AM
like
Object reference not set to an instance of an object.
in this line
arr[i] = dataGridView1.Rows[i].Cells[3].Value.ToString();
kiran kumarPosted Feb 27, 2010, 5:23 AM
better store the mobile no as string itself
this will resolve your problem radhika
radhika gantaPosted Feb 27, 2010, 4:34 AM
"Value was either too large or too small for an Int32"
in this line...
arr[i] = Convert.ToInt32(dataGridView1.Rows[i].Cells[3].Value.ToString());
kiran kumarPosted Feb 26, 2010, 8:22 PM
check it out
mark the answer if it helps you
kiran kumarPosted Feb 26, 2010, 8:48 AM
radhika gantaPosted Feb 26, 2010, 6:43 AM
kiran kumarPosted Feb 26, 2010, 6:32 AM
radhika gantaPosted Feb 26, 2010, 6:23 AM
kiran kumarPosted Feb 26, 2010, 6:15 AM
radhika gantaPosted Feb 26, 2010, 6:12 AM
radhika gantaPosted Feb 26, 2010, 6:06 AM
kiran kumarPosted Feb 26, 2010, 6:05 AM
radhika gantaPosted Feb 26, 2010, 6:05 AM
kiran kumarPosted Feb 26, 2010, 6:02 AM
radhika gantaPosted Feb 26, 2010, 6:01 AM
radhika gantaPosted Feb 26, 2010, 5:44 AM
am getting this execption in this line....
//this.dataGridView2.Rows.Add(dr);
kiran kumarPosted Feb 26, 2010, 5:25 AM
mark the answer if it helps you
kiran kumarPosted Feb 26, 2010, 4:36 AM
radhika gantaPosted Feb 26, 2010, 4:06 AM
kiran kumarPosted Feb 26, 2010, 4:06 AM
kiran kumarPosted Feb 26, 2010, 4:02 AM
radhika gantaPosted Feb 26, 2010, 3:56 AM
kiran kumarPosted Feb 25, 2010, 9:07 AM
check it out,let me know if it satisfies your requirements
change the connection string and querystring and execute the program
click the button you will be getting values from database
click on the checkboxe,you will be getting mobileno in the label
this is the database table i have taken
grab is the table name
name age mob
kiran 23 07
kumar 23 08
if you get any errors mail me your project files
mark the answer if it helps you
kiran kumarPosted Feb 25, 2010, 6:23 AM
radhika gantaPosted Feb 25, 2010, 6:13 AM
radhika gantaPosted Feb 25, 2010, 6:12 AM
kiran kumarPosted Feb 25, 2010, 6:09 AM
radhika gantaPosted Feb 25, 2010, 5:59 AM
radhika gantaPosted Feb 25, 2010, 5:56 AM
the entire procedure has been done in datagrid after binding ....
if any further clarifications feel free to ask me...
kiran kumarPosted Feb 25, 2010, 5:50 AM
radhika gantaPosted Feb 25, 2010, 5:43 AM
radhika gantaPosted Feb 25, 2010, 5:42 AM
kiran kumarPosted Feb 25, 2010, 5:21 AM