Error [Index was outside the bounds of the array] ?!

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

I got a textbox and datagrid,I need to input the key in textbox and press
"delete" , so the datarow will be deleted.
(i use another dataadapter and dataset to delete the record)
Now,I want to clear my dataset and fill in again as the following code :-
[However I got the above error message]

' dsSeaExHBL_cntrmark.Clear()
' daSeaExHBL_cntrmark.SelectCommand.CommandText = "....etc
' daSeaExHBL_cntrmark.Fill(dsSeaExHBL_cntrmark,
"billladingcontainer")

** If i didn't fill in the dataset again, the datagrid will remain my
deleted record**
 
Oh no, My problem is not solved. after i deleted the record, and click back
to the datagrid. the error still occured
Agnes said:
I solve my problem la .
I re-bind my datagrid . that's oks

Agnes said:
I got a textbox and datagrid,I need to input the key in textbox and press
"delete" , so the datarow will be deleted.
(i use another dataadapter and dataset to delete the record)
Now,I want to clear my dataset and fill in again as the following code :-
[However I got the above error message]

' dsSeaExHBL_cntrmark.Clear()
' daSeaExHBL_cntrmark.SelectCommand.CommandText = "....etc
' daSeaExHBL_cntrmark.Fill(dsSeaExHBL_cntrmark,
"billladingcontainer")

** If i didn't fill in the dataset again, the datagrid will remain my
deleted record**
 
Hi Agnes,

Can you show how you delete your row.
Most made mistakes in this, people are not deleting it however removing it
or are calling the acceptchanges before the update is done?

Cor
Oh no, My problem is not solved. after i deleted the record, and click back
to the datagrid. the error still occured
Agnes said:
I solve my problem la .
I re-bind my datagrid . that's oks

Agnes said:
I got a textbox and datagrid,I need to input the key in textbox and press
"delete" , so the datarow will be deleted.
(i use another dataadapter and dataset to delete the record)
Now,I want to clear my dataset and fill in again as the following code :-
[However I got the above error message]

' dsSeaExHBL_cntrmark.Clear()
' daSeaExHBL_cntrmark.SelectCommand.CommandText = "....etc
' daSeaExHBL_cntrmark.Fill(dsSeaExHBL_cntrmark,
"billladingcontainer")

** If i didn't fill in the dataset again, the datagrid will remain my
deleted record**
 
Back
Top