Call an event inside a function c#
How do i call an event inside a function? Because i am having an error
Object reference not set to instance of an object and the error pointed at
: _e.RowIndex
And i was wondering how do i call an event inside a function. Now what i
could is call an event from new EventHandler(....) , but now i want call a
event inside a function and it is gave me the error Object reference not
set to instance of an object
Here is the code:
private void UpdateQuantityDataGridView(object sender, EventArgs e)
{
DataGridViewCellEventArgs _e = null;
cmdSelect.Parameters.Add( "ProductCode" ,
System.Data.OleDb.OleDbType.VarChar ) ;
cmdSelect.Parameters[ "ProductCode" ].Value = dataGridView1[ "Product
Code" , _e.RowIndex].Value;
}
Is the code above was correct way to do that?
No comments:
Post a Comment