hi all
I ve datagrid view dginvoicelist which contains
Id,date,amount,note,transaction
upon clicking a button addinvoice , a widows form appears where in we insert the detials above ,once saved all the details are put into datagrid mentioned above .
My problem is if user clicks on any of the cells in gridview it displays this error in this event
private void dgInvoiceList_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
if (dgInvoiceList.SelectedRows[0].Cells["TransactionComplete"].Value.Equals(false)) //Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
}
why is this?how to solve?
Can i disable the cells ,as when addinvoice button is clicked windows form appears ,for edit also windows form appears,upon saving the values sit in datagridview
So can I disable the cells so that if user clicks on cells this error wont appear
If i disable willl i be able to edit or add when I click buttons??