Click here to Skip to main content
16,015,072 members
Home / Discussions / C#
   

C#

 
AnswerRe: BindingSource and DataSet Pin
User 171649210-Dec-06 13:28
professionalUser 171649210-Dec-06 13:28 
AnswerRe: BindingSource and DataSet Pin
Muammar©10-Dec-06 20:16
Muammar©10-Dec-06 20:16 
QuestionProject Installer - Installing Fonts? Pin
wbjohnson10-Dec-06 7:19
wbjohnson10-Dec-06 7:19 
AnswerRe: Project Installer - Installing Fonts? Pin
Filip van der Meeren10-Dec-06 9:16
Filip van der Meeren10-Dec-06 9:16 
GeneralRe: Project Installer - Installing Fonts? Pin
wbjohnson10-Dec-06 9:19
wbjohnson10-Dec-06 9:19 
GeneralRe: Project Installer - Installing Fonts? [modified] Pin
Filip van der Meeren10-Dec-06 9:25
Filip van der Meeren10-Dec-06 9:25 
GeneralRe: Project Installer - Installing Fonts? Pin
wbjohnson10-Dec-06 9:29
wbjohnson10-Dec-06 9:29 
Questiongetting the values from unbound DatagridviewcomboBoxColumns ??? Pin
Rocky#10-Dec-06 7:05
Rocky#10-Dec-06 7:05 
hi every one,
well I have this little problem here. I'm getting a nullreferenceException when I try to access the value of a DataGridViewComboBox column. I have correctly bounded the column and its also showing the values of that table too. The name of the column is "AttendanceComboBoxColumn". now I just wanna know how to get the value selected in this comboBox.

for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
//MessageBox.Show("att: " + dataGridView1["AttendanceComboBoxColumn", i].Value.ToString() + "\n empid: " + dataGridView1["empIDDataGridViewTextBoxColumn", i].Value.ToString()+"\nDate: "+selected_date.ToString());
//MessageBox.Show("att: " + dataGridView1["AttendanceComboBoxColumn", i].Value.ToString() + "\n empid: " + dataGridView1["empIDDataGridViewTextBoxColumn", i].Value.ToString());
//MessageBox.Show("att: " + dataGridView1["AttendanceComboBoxColumn", i].Value.ToString() );// null ref
//MessageBox.Show("att: " + dataGridView1["empIDDataGridViewTextBoxColumn", i].Value.ToString()); // ok
//sqlUpdateCommandAttendance.Parameters["@AttendanceID"].Value = Convert.ToDecimal(dataGridView1["AttendanceComboBoxColumn", i].Value);
int c = AttendanceComboBoxColumn.DisplayIndex;
MessageBox.Show(dataGridView1[c, i].Value.ToString());
sqlUpdateCommandAttendance.Parameters["@AttendanceID"].Value = Convert.ToDecimal(dataGridView1[c,i].Value);
sqlUpdateCommandAttendance.Parameters["@original_empid"].Value = Convert.ToDecimal(dataGridView1["empIDDataGridViewTextBoxColumn", i].Value);
sqlUpdateCommandAttendance.Parameters["@original_attendDate"].Value = selected_date;
count+=sqlUpdateCommandAttendance.ExecuteNonQuery();
}


thanks in advance


Rocky
Questionruning a *.exe file Pin
hadad10-Dec-06 6:54
hadad10-Dec-06 6:54 
AnswerRe: runing a *.exe file Pin
gnadeem10-Dec-06 7:10
gnadeem10-Dec-06 7:10 
GeneralRe: runing a *.exe file Pin
karam chandrabose10-Dec-06 8:12
karam chandrabose10-Dec-06 8:12 
QuestionPopulating a ComboBox Pin
Civic0610-Dec-06 5:33
Civic0610-Dec-06 5:33 
AnswerRe: Populating a ComboBox Pin
teejayem10-Dec-06 5:48
teejayem10-Dec-06 5:48 
AnswerRe: Populating a ComboBox Pin
Robert Rohde10-Dec-06 5:53
Robert Rohde10-Dec-06 5:53 
AnswerRe: Populating a ComboBox Pin
Luis Alonso Ramos10-Dec-06 7:15
Luis Alonso Ramos10-Dec-06 7:15 
Questiontelephonic application Pin
amgag10-Dec-06 5:04
amgag10-Dec-06 5:04 
QuestionHow to search/replace words in a pre-formatted pdf file Pin
babbelfisken10-Dec-06 3:59
babbelfisken10-Dec-06 3:59 
Questionsend data over modem Pin
sianatia10-Dec-06 1:55
sianatia10-Dec-06 1:55 
QuestionMarshaling a string to a native dll... Pin
Shy Agam10-Dec-06 1:16
Shy Agam10-Dec-06 1:16 
AnswerRe: Marshaling a string to a native dll... Pin
Luc Pattyn10-Dec-06 1:49
sitebuilderLuc Pattyn10-Dec-06 1:49 
QuestionHow can I implement "OLE object" with C# and SQL Pin
devloperx10-Dec-06 0:09
devloperx10-Dec-06 0:09 
AnswerRe: How can I implement "OLE object" with C# and SQL Pin
devloperx10-Dec-06 2:21
devloperx10-Dec-06 2:21 
QuestionWorkgroup name of local host Pin
cashi_qau9-Dec-06 23:13
cashi_qau9-Dec-06 23:13 
GeneralRe: Workgroup name of local host Pin
gnadeem10-Dec-06 3:10
gnadeem10-Dec-06 3:10 
QuestionString - ValueType or ReferenceType? Pin
Shy Agam9-Dec-06 22:43
Shy Agam9-Dec-06 22:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.