datatable

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all , My question is why after i delete a row from my datatable it freezes? Its linked to a datagrid. When i add ad update row it works fine but when i want to delete it freeze after the record is deleted

private void deleteRow(dRoutedOrder oStat

DataRow dr = orderTable.Rows.Find(oStat.MasterOID )
dr.Delete()
Console.WriteLine ("delete")
 
Hi,

When are you calling deleteRow()?

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

Newbie said:
Hello all , My question is why after i delete a row from my datatable it
freezes? Its linked to a datagrid. When i add ad update row it works
fine but when i want to delete it freeze after the record is deleted.
 
on some of the examples i saw when it found the record i want thats the command to delete the row

What i would like is, when it finds the record delete that row or record

Thanks
 
my program still freeze after deleting a row from datatable

cod
private void deleteRow1(dRoutedOrder oStat


DataView dv = orderTable.DefaultView
Object[] searchValue = new Object[1]
dv.Sort = "OrderID"
string test = (oStat.RemoteOID.ToString ())
searchValue[0]=(test)
int i = dv.Find(searchValue)
orderTable.Rows.Delete()

}
 
Hi Newbie,

But still from where are you calling deleteRow1 method?

--
Miha Markic [MVP C#] - DXSquad/RightHand .NET consulting & software
development
miha at rthand com www.rthand.com

Developer Express newsgroups are for peer-to-peer support.
For direct support from Developer Express, write to (e-mail address removed)
Bug reports should be directed to: (e-mail address removed)
Due to newsgroup guidelines, DX-Squad will not answer anonymous postings.
 
No, no.
I did mean the piece of code where you invoke deleteRow1:
deleteRow(oStat);

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

Newbie said:
The programs receive a number then does a search in the datatable for that
number if it finds the number the next command it to delete that row. No
user interaction just to view data.
 
Back
Top