Link to home
Start Free TrialLog in
Avatar of bavani
bavani

asked on

Flex Grid - Add, edit and delete

how to add, edit and delete records in Flex Grid and how to update the database through flex grid with using datacontrol and without using datacontrol.
ASKER CERTIFIED SOLUTION
Avatar of adityau
adityau

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stew1
stew1

I have an article by Mr. Frank Sommer, Microsoft Regional director, Northern Ca.
"MSFlexGrid Tips and Tricks"
October 1997

This article shows several trick with Flexgrids , one being to 'float a text box' over the grid to handel the editing.
I tried it and it works! Check the MS site for this report

LoL
Stew
I am writing this comment for your previous question in which you had asked abount invoice type updates.

If you want to make an invoice type update that is if for one entry of Name & Date there are multiple entries of products, then you can also use a list box.
You can use text boxes to enter & edit or delete items in the list boxes

  you can use the following code for multiple updates.

If working with datacontrol
then
   Data1.refresh
With Data1.recordset
  For i = 0 to List1.ListCount-1
     .Addnew
     .Fields("Name") = txtName.text
     .fields("Date") = txtDate.text
     .fields("BillNo") = txtBillNo.text
     .fields("Item") = List1.List(i)
     .fields("Quantity") = List2.List(i)
     .fields("Rate") = Val(List3.List(i))
    .update
  Next i
End With
Yes i've done this myself using a floating textobox postition in the cell when it's clicked.It worked nicely for me.