VB 6.0 - MS Flexgrid problem

Asked By Ralph Acido on 11-Apr-06 05:18 AM
i have a program that adds items in a MS Flexgrid Control.. when i removed some items in in the control works fine... but the problem is when again i'm trying to add item it will not add immediately...

re MS Flexgrid problem

Asked By Rupali Randhave Kolhe on 11-Apr-06 09:03 AM
if u r fetching data from table then
 Dim RS As Recordset 
Set RS = New Recordset 
Set RS = condata.Execute("SELECT NAME FROM emp") 
While Not RS.EOF 
MSHFLEXGRD1.AddItem Trim(RS("NAME")) 
RS.MoveNext 
Wend 
RS.Close

else

 MSHFLEXGRD1.AddItem "asda"

hope:)

no Im not fetching data from a table

Asked By Ralph Acido on 11-Apr-06 07:54 PM
im adding an item.. these are the values that i add to the control BankCode, Account Number, Cheque Number, Date and Amount... the problem 

this is the way i add the item in the flexgrid..

msflexgrid.additem BankCode & vbtab AccountNo & vbtab & ChequeNO & vbtab &  DAte & vbtab & Amount, ctr

where ctr is my counter...


this is the way i remove item my my flexgrid:
       msflexgrid.removeitem(index)


so my problem is When i remove an item in the Flexgrid then add again an another item the item will not appear... 

how can i solve this one?

hi

Asked By Rupali Randhave Kolhe on 12-Apr-06 12:13 AM
give perticular row no while adding data.
u can get total no of rows by  msflexgrid.rows properties.
save it in one variable.& add after that
:)