|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
clear datagridinput the figure. my code list as follow. when the datagrid got less then 100 tables, the code works, However, when it over 100 rows. it can't work. Does anything wrong with my code ? Please help P.S - I can't use delete since the user remove the unused record before save. Dim cm As CurrencyManager = Me.BindingContext(dsRvPvHeader, "myInvTable") cm.EndCurrentEdit() For i = 1 To cm.Count If cm.Current.item("debit") = 0 And cm.Current.item("credit") = 0 And cm.Current.item("voucherno") = Me.txtVoucherNo.Text Then cm.RemoveAt(cm.Position) Else cm.Position += 1 End If Next End If cm.Refresh() cm.EndCurrentEdit() Why do you have cm.EndCurrentEdit() twice? Maybe you meant start?
Show quoteHide quote On Oct 23, 11:40 am, "Agnes" <a***@dynamictech.com.hk> wrote: > my datagrid is bind to the table, I need to check clear when the user didn't > input the figure. > my code list as follow. when the datagrid got less then 100 tables, the code > works, However, when it over 100 rows. it can't work. > Does anything wrong with my code ? > Please help > P.S - I can't use delete since the user remove the unused record before > save. > > Dim cm As CurrencyManager = Me.BindingContext(dsRvPvHeader, > "myInvTable") > cm.EndCurrentEdit() > For i = 1 To cm.Count > If cm.Current.item("debit") = 0 And > cm.Current.item("credit") = 0 And cm.Current.item("voucherno") = > Me.txtVoucherNo.Text Then > cm.RemoveAt(cm.Position) > Else > cm.Position += 1 > End If > Next > End If > cm.Refresh() > cm.EndCurrentEdit()
How to receive an array of doubles using VB from a C DLL
Question about rounding the decimal Need help re: vb.net windows forms Controlling how Excel starts when using VB.Net Automation Having problems with SetWindowText api DataView Question What are the strings that define a connection's server version? Setting Null value in SQL update statement [Newbie] How can I do that ? Event firing order |
|||||||||||||||||||||||